From 5dfc32e82c79d901c1b0f5570c713e72ef66b59d Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Wed, 10 Apr 2019 21:37:19 +0200 Subject: [PATCH] randomize timesync seqNo --- src/timesync.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timesync.cpp b/src/timesync.cpp index 4b7176bb..c5089687 100644 --- a/src/timesync.cpp +++ b/src/timesync.cpp @@ -25,7 +25,7 @@ typedef std::chrono::duration> 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 myClock_timepoint time_sync_tx[TIME_SYNC_SAMPLES]; static myClock_timepoint time_sync_rx[TIME_SYNC_SAMPLES];