From 852b10e7589aca4444adbdc0bd4b5eb1b9bb18ca Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Wed, 6 Jan 2016 23:42:25 +1100 Subject: Fix issue with slower protocols --- libraries/OBD/OBD.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'libraries/OBD/OBD.h') 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 -- cgit v1.2.3