From 91146cb4bce6482676e7e784c8756ec243168ba6 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Tue, 10 Sep 2013 12:56:10 +0800 Subject: sync with library update --- megalogger/megalogger.ino | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/megalogger/megalogger.ino b/megalogger/megalogger.ino index 8beb80f..423d89c 100644 --- a/megalogger/megalogger.ino +++ b/megalogger/megalogger.ino @@ -298,9 +298,15 @@ public: return true; } private: - void initIdleLoop() + void dataIdleLoop() { - // called while initializing + if (getState() == OBD_CONNECTED) { + if (lastDataTime && GPSUART.available()) + processGPS(); + return; + } + + // display while initializing char buf[10]; unsigned int t = (millis() - startTime) / 1000; sprintf(buf, "%02u:%02u", t / 60, t % 60); @@ -332,11 +338,6 @@ private: #endif } #ifdef GPSUART - void dataIdleLoop() - { - if (lastDataTime && GPSUART.available()) - processGPS(); - } void processGPS() { // process GPS data -- cgit v1.2.3