From 3e44e8f47c9f8cbbca19d05e2ff0d53565bc1a82 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Mon, 17 Mar 2014 14:51:11 +0800 Subject: Fix bug --- unologger/unologger.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'unologger') 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; -- cgit v1.2.3