![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Small project to display some OBD values from the Toyota GT86/ Subaru BRZ/ Scion FRS on an OLED display.
Dependencies: Adafruit_GFX MODSERIAL mbed-rtos mbed
PidValue.h@5:0b229ba8ede5, 2014-04-27 (annotated)
- Committer:
- chrta
- Date:
- Sun Apr 27 19:13:35 2014 +0000
- Revision:
- 5:0b229ba8ede5
- Child:
- 6:506b703a8acf
Split pids into files.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chrta | 5:0b229ba8ede5 | 1 | #ifndef PIDVALUE_H |
chrta | 5:0b229ba8ede5 | 2 | #define PIDVALUE_H |
chrta | 5:0b229ba8ede5 | 3 | |
chrta | 5:0b229ba8ede5 | 4 | #include <stdint.h> |
chrta | 5:0b229ba8ede5 | 5 | |
chrta | 5:0b229ba8ede5 | 6 | class PidValue |
chrta | 5:0b229ba8ede5 | 7 | { |
chrta | 5:0b229ba8ede5 | 8 | public: |
chrta | 5:0b229ba8ede5 | 9 | PidValue(const char* name, const char* unit); |
chrta | 5:0b229ba8ede5 | 10 | virtual bool decode(const uint8_t* data, uint16_t length) = 0; |
chrta | 5:0b229ba8ede5 | 11 | void print(); |
chrta | 5:0b229ba8ede5 | 12 | const char* getName(); |
chrta | 5:0b229ba8ede5 | 13 | protected: |
chrta | 5:0b229ba8ede5 | 14 | unsigned int m_value; |
chrta | 5:0b229ba8ede5 | 15 | const char* m_unit; |
chrta | 5:0b229ba8ede5 | 16 | const char* m_name; |
chrta | 5:0b229ba8ede5 | 17 | }; |
chrta | 5:0b229ba8ede5 | 18 | |
chrta | 5:0b229ba8ede5 | 19 | #endif //PIDVALUE_H |