Making a BMW E90 instrument cluster alive for demonstration purposes

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SpeedMsg.h Source File

SpeedMsg.h

00001 #ifndef SPEEDMSG_H
00002 #define SPEEDMSG_H
00003 
00004 #include "mbed.h"
00005 
00006 class SpeedMsg {
00007 
00008     char counter1;      // Increase by 144 (0x90)
00009     char counter2;      // Increase by: 1 2 1 2 1 2 2 1 2 1 2 1 2 1 2 2 (then repeated)
00010 
00011     char c2inc[16];
00012     char c2incp;
00013 
00014     uint8_t spb[6];
00015 
00016     public:
00017         SpeedMsg();
00018         
00019         void setSpeed(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5);
00020         bool sendMessage(CAN *can);
00021 };
00022 
00023 #endif