reworked lora appserver timesync logic (part 2)

This commit is contained in:
Klaus K Wilting committed 2020-03-03 16:38:29 +01:00
1 parent 1516d71018
commit c17bfa02af
2 files changed
+54 -49

No files matched your search

+4 -2
View File
@@ -8,8 +8,10 @@
//#define TIME_SYNC_TRIGGER 100 // threshold for time sync [milliseconds]
#define TIME_SYNC_FRAME_LENGTH 0x07 // timeserver answer frame length [bytes]
#define TIME_SYNC_FIXUP 4 // calibration to fixup processing time [milliseconds]
#define TIMEREQUEST_MAX_SEQNO 0xf0 // threshold for wrap around seqno
#define TIME_SYNC_FIXUP 16 // empirical calibration to fixup processing time [milliseconds]
#define TIMEREQUEST_MAX_SEQNO 0xfe // threshold for wrap around seqno
#define TIMEREQUEST_FINISH \
(TIMEREQUEST_MAX_SEQNO + 1) // marker for end of timesync handshake
enum timesync_t {
timesync_tx,