diff options
Diffstat (limited to 'libraries/OBD/OBD.h')
-rw-r--r-- | libraries/OBD/OBD.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libraries/OBD/OBD.h b/libraries/OBD/OBD.h index 02d735d..b2249dd 100644 --- a/libraries/OBD/OBD.h +++ b/libraries/OBD/OBD.h @@ -106,7 +106,7 @@ public: */
virtual void begin();
// initialize OBD-II connection
- virtual bool init(byte protocol = 0);
+ virtual bool init(OBD_PROTOCOLS protocol = PROTO_AUTO);
// un-initialize OBD-II connection
virtual void end();
// set serial baud rate
@@ -139,17 +139,17 @@ public: byte pidmap[4 * 4];
protected:
virtual char* getResponse(byte& pid, char* buffer);
- virtual byte receive(char* buffer = 0, int timeout = OBD_TIMEOUT_SHORT);
- virtual bool available();
- virtual char read();
- virtual void write(const char* s);
- virtual void write(char c);
virtual void dataIdleLoop() {}
void recover();
void debugOutput(const char* s);
int normalizeData(byte pid, char* data);
OBD_STATES m_state;
private:
+ virtual byte receive(char* buffer = 0, int timeout = OBD_TIMEOUT_SHORT);
+ virtual bool available();
+ virtual char read();
+ virtual void write(const char* s);
+ virtual void write(char c);
virtual uint8_t getPercentageValue(char* data)
{
return (uint16_t)hex2uint8(data) * 100 / 255;
@@ -208,7 +208,7 @@ class COBDI2C : public COBD { public:
void begin();
void end();
- bool init(byte protocol = 0);
+ bool init(OBD_PROTOCOLS protocol = PROTO_AUTO);
bool read(byte pid, int& result);
void write(const char* s);
// Asynchronized access API
|