summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--megalogger/megalogger.ino15
1 files 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