diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2015-09-23 17:20:13 +1000 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2015-09-23 17:20:13 +1000 |
commit | 05445f0fe56f41e4a264717df3e390ed853165b9 (patch) | |
tree | 35d944bd0bb340fdb7f84577219d5f7ec538ce64 | |
parent | 039be5bd99ac673530be5eaae176c230956853ca (diff) | |
download | 2021-arduino-obd-05445f0fe56f41e4a264717df3e390ed853165b9.tar.gz 2021-arduino-obd-05445f0fe56f41e4a264717df3e390ed853165b9.tar.bz2 2021-arduino-obd-05445f0fe56f41e4a264717df3e390ed853165b9.zip |
Fix GPS date logging bug
-rw-r--r-- | megalogger/megalogger.ino | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/megalogger/megalogger.ino b/megalogger/megalogger.ino index 629450f..65237dd 100644 --- a/megalogger/megalogger.ino +++ b/megalogger/megalogger.ino @@ -376,10 +376,10 @@ void processGPS() logger.dataTime = millis(); gps.get_datetime(&date, &time, 0); - if (date != gpsDate) { + if ((uint16_t)date != gpsDate) { // log date only if it's changed - logger.logData(PID_GPS_DATE, (int32_t)time); - gpsDate = date; + logger.logData(PID_GPS_DATE, (int32_t)date); + gpsDate = (uint16_t)date; } logger.logData(PID_GPS_TIME, (int32_t)time); |