summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2017-05-07 21:56:31 +1000
committerStanley Huang <stanleyhuangyc@gmail.com>2017-05-07 21:56:31 +1000
commitd4bb136599fae4daac47d5952a3672cce7c3db2a (patch)
tree5d155811fca52493db44def681606e63f50d04b1
parent21da80d9d5baff05cd8b3e9c1733c345264f8060 (diff)
download2021-arduino-obd-d4bb136599fae4daac47d5952a3672cce7c3db2a.tar.gz
2021-arduino-obd-d4bb136599fae4daac47d5952a3672cce7c3db2a.tar.bz2
2021-arduino-obd-d4bb136599fae4daac47d5952a3672cce7c3db2a.zip
Updated tester
-rw-r--r--tester/tester.ino6
1 files changed, 3 insertions, 3 deletions
diff --git a/tester/tester.ino b/tester/tester.ino
index e2ec881..bbbcf6d 100644
--- a/tester/tester.ino
+++ b/tester/tester.ino
@@ -141,7 +141,7 @@ bool checkSD()
#endif
void testOut()
{
- static const char PROGMEM cmds[][6] = {"ATZ\r", "ATH1\r", "ATRV\r", "0100\r", "010C\r", "0902\r"};
+ static const char PROGMEM cmds[][8] = {"ATZ\r", "ATH1\r", "ATSP 0\r", "ATRV\r", "0100\r", "0902\r"};
char buf[128];
lcd.setColor(RGB16_WHITE);
@@ -151,13 +151,13 @@ bool checkSD()
// recover from possible previous incomplete communication
recover();
for (byte i = 0; i < sizeof(cmds) / sizeof(cmds[0]); i++) {
- char cmd[6];
+ char cmd[8];
memcpy_P(cmd, cmds[i], sizeof(cmd));
lcd.setColor(RGB16_WHITE);
lcd.print("Sending ");
lcd.println(cmd);
lcd.setColor(RGB16_CYAN);
- if (sendCommand(cmd, buf, sizeof(buf))) {
+ if (sendCommand(cmd, buf, sizeof(buf), OBD_TIMEOUT_LONG)) {
char *p = strstr(buf, cmd);
if (p)
p += strlen(cmd);