summaryrefslogtreecommitdiff
path: root/megalogger
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2013-09-10 12:56:10 +0800
committerStanley Huang <stanleyhuangyc@gmail.com>2013-09-10 12:56:10 +0800
commit91146cb4bce6482676e7e784c8756ec243168ba6 (patch)
tree501450071c77e464e9a3a3fb496fae77d2b5b8bf /megalogger
parent288736164525506d107a755589a2913a612227ac (diff)
download2021-arduino-obd-91146cb4bce6482676e7e784c8756ec243168ba6.tar.gz
2021-arduino-obd-91146cb4bce6482676e7e784c8756ec243168ba6.tar.bz2
2021-arduino-obd-91146cb4bce6482676e7e784c8756ec243168ba6.zip
sync with library update
Diffstat (limited to 'megalogger')
-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