Projectkk2glider/gps misc fixes (#3970)
* Fixed Lua GPS date (year is now kept with four digits) * * GPS year displayed with two digits * GPS date/time handling fixes
This commit is contained in:
committed by
Bertrand Songis
parent
a332f7a872
commit
5ba14734cb
+1
-1
@@ -460,7 +460,7 @@ uint8_t rtcAdjust(uint16_t year, uint8_t mon, uint8_t day, uint8_t hour, uint8_t
|
||||
if ((get_tmr10ms() - lastRtcAdjust) > (RTC_ADJUST_PERIOD * 100)) {
|
||||
lastRtcAdjust = get_tmr10ms();
|
||||
|
||||
if ((hour == 0 && min == 0) || (hour == 23 && min == 59)) return 0;
|
||||
if (year == 0 || (hour == 0 && min == 0) || (hour == 23 && min == 59)) return 0;
|
||||
|
||||
// convert given UTC time to local time (to seconds) and compare it with RTC
|
||||
struct gtm t;
|
||||
|
||||
Reference in New Issue
Block a user