summaryrefslogtreecommitdiff
path: root/megalogger
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2015-09-23 17:20:13 +1000
committerStanley Huang <stanleyhuangyc@gmail.com>2015-09-23 17:20:13 +1000
commit05445f0fe56f41e4a264717df3e390ed853165b9 (patch)
tree35d944bd0bb340fdb7f84577219d5f7ec538ce64 /megalogger
parent039be5bd99ac673530be5eaae176c230956853ca (diff)
download2021-arduino-obd-05445f0fe56f41e4a264717df3e390ed853165b9.tar.gz
2021-arduino-obd-05445f0fe56f41e4a264717df3e390ed853165b9.tar.bz2
2021-arduino-obd-05445f0fe56f41e4a264717df3e390ed853165b9.zip
Fix GPS date logging bug
Diffstat (limited to 'megalogger')
-rw-r--r--megalogger/megalogger.ino6
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);