From a07593476806ce116e36c51b1350a8c2a5d8513c Mon Sep 17 00:00:00 2001
From: Stanley Huang <stanleyhuangyc@gmail.com>
Date: Fri, 13 Jan 2017 10:38:33 +1100
Subject: Improved initialization routine and fixed protocol selection issue

---
 libraries/OBD2UART/OBD2UART.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'libraries/OBD2UART/OBD2UART.h')

diff --git a/libraries/OBD2UART/OBD2UART.h b/libraries/OBD2UART/OBD2UART.h
index a6c186e..149e635 100644
--- a/libraries/OBD2UART/OBD2UART.h
+++ b/libraries/OBD2UART/OBD2UART.h
@@ -8,7 +8,7 @@
 #include <Arduino.h>
 
 #define OBD_TIMEOUT_SHORT 1000 /* ms */
-#define OBD_TIMEOUT_LONG 15000 /* ms */
+#define OBD_TIMEOUT_LONG 5000 /* ms */
 #define OBD_TIMEOUT_GPS 200 /* ms */
 #define OBD_SERIAL_BAUDRATE 38400
 
@@ -115,12 +115,10 @@ public:
 	virtual byte readPID(const byte pid[], byte count, int result[]);
 	// set device into
 	virtual void sleep();
-	// set working protocol (default auto)
-	virtual bool setProtocol(OBD_PROTOCOLS h = PROTO_AUTO);
 	// send AT command and receive response (return bytes received)
 	virtual byte sendCommand(const char* cmd, char* buf, byte bufsize, int timeout = OBD_TIMEOUT_LONG);
 	// read diagnostic trouble codes (return number of DTCs read)
-	virtual byte readDTC(uint16_t codes[], byte count = 1);
+	virtual byte readDTC(uint16_t codes[], byte maxCodes = 1);
 	// clear diagnostic trouble code
 	virtual void clearDTC();
 	// get battery voltage (works without ECU)
-- 
cgit v1.2.3