fix for negative time diffs
This commit is contained in:
parent
d33213b20a
commit
5b28fe03ed
@ -9,8 +9,8 @@
|
||||
#define TIME_SYNC_FIXUP 16 // compensation for processing time [milliseconds]
|
||||
#define TIME_SYNC_MAX_SEQNO 0xfe // threshold for wrap around time_sync_seqNo
|
||||
#define TIME_SYNC_END_FLAG (TIME_SYNC_MAX_SEQNO + 1) // end of handshake marker
|
||||
#define GPS_UTC_DIFF 315964800 // seconds diff between gps and utc epoch
|
||||
#define LEAP_SECS_SINCE_GPSEPOCH 18 // state of 2021
|
||||
#define GPS_UTC_DIFF 315964800UL // seconds diff between gps and utc epoch
|
||||
#define LEAP_SECS_SINCE_GPSEPOCH 18UL // state of 2021
|
||||
|
||||
enum timesync_t {
|
||||
timesync_tx,
|
||||
|
@ -230,7 +230,7 @@ void IRAM_ATTR timesync_serverAnswer(void *pUserData, int flag) {
|
||||
// pUserData: contains pointer to SeqNo (not needed here)
|
||||
// flag: indicates if we got a recent time from the network
|
||||
|
||||
uint32_t delay_msec;
|
||||
int32_t delay_msec;
|
||||
lmic_time_reference_t lmicTime;
|
||||
|
||||
if (flag != 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user