Making a BMW E90 instrument cluster alive for demonstration purposes

Dependencies:   mbed

SpeedMsg.h

Committer:
gume
Date:
2017-03-11
Revision:
3:4a4463380739

File content as of revision 3:4a4463380739:

#ifndef SPEEDMSG_H
#define SPEEDMSG_H

#include "mbed.h"

class SpeedMsg {

    char counter1;      // Increase by 144 (0x90)
    char counter2;      // Increase by: 1 2 1 2 1 2 2 1 2 1 2 1 2 1 2 2 (then repeated)

    char c2inc[16];
    char c2incp;

    uint8_t spb[6];

    public:
        SpeedMsg();
        
        void setSpeed(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5);
        bool sendMessage(CAN *can);
};

#endif