summaryrefslogtreecommitdiff
path: root/libraries/OBD/OBD.h
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2016-01-06 23:42:25 +1100
committerStanley Huang <stanleyhuangyc@gmail.com>2016-01-06 23:42:25 +1100
commit852b10e7589aca4444adbdc0bd4b5eb1b9bb18ca (patch)
treed944cb0a8d34155bc313a02f9814fc2436730de9 /libraries/OBD/OBD.h
parenta246fb7e13d7e649c868bcf709faeeae9b0862a4 (diff)
download2021-arduino-obd-852b10e7589aca4444adbdc0bd4b5eb1b9bb18ca.tar.gz
2021-arduino-obd-852b10e7589aca4444adbdc0bd4b5eb1b9bb18ca.tar.bz2
2021-arduino-obd-852b10e7589aca4444adbdc0bd4b5eb1b9bb18ca.zip
Fix issue with slower protocols
Diffstat (limited to 'libraries/OBD/OBD.h')
-rw-r--r--libraries/OBD/OBD.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/libraries/OBD/OBD.h b/libraries/OBD/OBD.h
index 81b442e..dd1cbf6 100644
--- a/libraries/OBD/OBD.h
+++ b/libraries/OBD/OBD.h
@@ -93,17 +93,6 @@ typedef enum {
OBD_CONNECTED = 2
} OBD_STATES;
-typedef struct {
- uint32_t date;
- uint32_t time;
- int32_t lat;
- int32_t lon;
- int16_t alt;
- uint8_t speed;
- uint8_t sat;
- int16_t heading;
-} GPS_DATA;
-
uint16_t hex2uint16(const char *p);
uint8_t hex2uint8(const char *p);
@@ -131,7 +120,7 @@ public:
// set working protocol (default auto)
virtual bool setProtocol(OBD_PROTOCOLS h = PROTO_AUTO);
// send AT command and receive response
- virtual byte sendCommand(const char* cmd, char* buf, byte bufsize);
+ virtual byte sendCommand(const char* cmd, char* buf, byte bufsize, int timeout = OBD_TIMEOUT_LONG);
// clear diagnostic trouble code
virtual void clearDTC();
// get battery voltage (in 0.1V, e.g. 125 for 12.5V, works without ECU)
@@ -145,9 +134,7 @@ public:
// determine if the PID is supported
virtual bool isValidPID(byte pid);
// init GPS module
- virtual bool initGPS(unsigned long baudrate = 38400);
// parse GPS data
- virtual bool getGPSData(GPS_DATA* gdata);
// set current PID mode
byte dataMode;
// occurrence of errors