Gabor Feher
/
BMWE90-InstrumentCluster
Making a BMW E90 instrument cluster alive for demonstration purposes
SpeedMsg.h@3:4a4463380739, 2017-03-11 (annotated)
- Committer:
- gume
- Date:
- Sat Mar 11 10:03:52 2017 +0000
- Revision:
- 3:4a4463380739
Initial Speed module (not yet working); Fuel data
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gume | 3:4a4463380739 | 1 | #ifndef SPEEDMSG_H |
gume | 3:4a4463380739 | 2 | #define SPEEDMSG_H |
gume | 3:4a4463380739 | 3 | |
gume | 3:4a4463380739 | 4 | #include "mbed.h" |
gume | 3:4a4463380739 | 5 | |
gume | 3:4a4463380739 | 6 | class SpeedMsg { |
gume | 3:4a4463380739 | 7 | |
gume | 3:4a4463380739 | 8 | char counter1; // Increase by 144 (0x90) |
gume | 3:4a4463380739 | 9 | char counter2; // Increase by: 1 2 1 2 1 2 2 1 2 1 2 1 2 1 2 2 (then repeated) |
gume | 3:4a4463380739 | 10 | |
gume | 3:4a4463380739 | 11 | char c2inc[16]; |
gume | 3:4a4463380739 | 12 | char c2incp; |
gume | 3:4a4463380739 | 13 | |
gume | 3:4a4463380739 | 14 | uint8_t spb[6]; |
gume | 3:4a4463380739 | 15 | |
gume | 3:4a4463380739 | 16 | public: |
gume | 3:4a4463380739 | 17 | SpeedMsg(); |
gume | 3:4a4463380739 | 18 | |
gume | 3:4a4463380739 | 19 | void setSpeed(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5); |
gume | 3:4a4463380739 | 20 | bool sendMessage(CAN *can); |
gume | 3:4a4463380739 | 21 | }; |
gume | 3:4a4463380739 | 22 | |
gume | 3:4a4463380739 | 23 | #endif |