randomize timesync seqNo

This commit is contained in:
Verkehrsrot 2019-04-10 21:37:19 +02:00
parent f1c1b1c00a
commit 5dfc32e82c

View File

@ -25,7 +25,7 @@ typedef std::chrono::duration<long long int, std::ratio<1, 1000>>
TaskHandle_t timeSyncReqTask = NULL; TaskHandle_t timeSyncReqTask = NULL;
static uint8_t time_sync_seqNo = TIMEANSWERPORT_MIN; static uint8_t time_sync_seqNo = random(TIMEANSWERPORT_MIN, TIMEANSWERPORT_MAX);
static bool timeSyncPending = false; static bool timeSyncPending = false;
static myClock_timepoint time_sync_tx[TIME_SYNC_SAMPLES]; static myClock_timepoint time_sync_tx[TIME_SYNC_SAMPLES];
static myClock_timepoint time_sync_rx[TIME_SYNC_SAMPLES]; static myClock_timepoint time_sync_rx[TIME_SYNC_SAMPLES];