From 05445f0fe56f41e4a264717df3e390ed853165b9 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Wed, 23 Sep 2015 17:20:13 +1000 Subject: Fix GPS date logging bug --- megalogger/megalogger.ino | 6 +++--- 1 file 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); -- cgit v1.2.3