summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2014-03-17 14:51:11 +0800
committerStanley Huang <stanleyhuangyc@gmail.com>2014-03-17 14:51:11 +0800
commit3e44e8f47c9f8cbbca19d05e2ff0d53565bc1a82 (patch)
tree9db831e0890e6d84aa4bd9f5aab1556de416a988
parent893deea2c02b66e1d9900b85f79df8d33b4cc0ab (diff)
download2021-arduino-obd-3e44e8f47c9f8cbbca19d05e2ff0d53565bc1a82.tar.gz
2021-arduino-obd-3e44e8f47c9f8cbbca19d05e2ff0d53565bc1a82.tar.bz2
2021-arduino-obd-3e44e8f47c9f8cbbca19d05e2ff0d53565bc1a82.zip
Fix bug
-rw-r--r--unologger/unologger.ino5
1 files changed, 4 insertions, 1 deletions
diff --git a/unologger/unologger.ino b/unologger/unologger.ino
index dc4cf1f..d636938 100644
--- a/unologger/unologger.ino
+++ b/unologger/unologger.ino
@@ -69,9 +69,11 @@ public:
showStates();
+ /*
lcd.clear();
benchmark();
delay(1000);
+ */
uint16_t flags = FLAG_CAR | FLAG_OBD;
if (state & STATE_GPS_FOUND) flags |= FLAG_GPS;
@@ -157,7 +159,7 @@ public:
processAccelerometer();
}
#endif
- if (errors >= 2) {
+ if (errors >= 5) {
reconnect();
}
}
@@ -278,6 +280,7 @@ private:
logData(0x100 | pid, value);
lastValue = value;
lastPid = pid;
+ errors = 0;
} else {
errors++;
return;