randomize time sync seq nr
This commit is contained in:
1 parent
3d0c6f3249
commit
01fb7c53b4
3 files changed
+3
-3
No files matched your search
+1
-2
@@ -16,7 +16,7 @@
|
||||
|
||||
// Set this to include BLE counting and vendor filter functions, or to switch off WIFI counting
|
||||
#define VENDORFILTER 1 // set to 0 if you want to count things, not people
|
||||
#define BLECOUNTER 1 // set it to 1 if you want to use BLE count, at expense of power & memory
|
||||
#define BLECOUNTER 0 // set it to 1 if you want to use BLE count, at expense of power & memory
|
||||
#define WIFICOUNTER 1 // set it to 0 if you want to switch off WIFI count
|
||||
|
||||
// BLE scan parameters
|
||||
@@ -99,7 +99,6 @@
|
||||
#define BATTPORT 8 // battery voltage
|
||||
#define TIMEPORT 9 // time query and response
|
||||
#define TIMEDIFFPORT 13 // time adjust diff
|
||||
#define TIMEREQUEST_MAX_SEQNO 250 // time answer, start of port range
|
||||
#define SENSOR1PORT 10 // user sensor #1
|
||||
#define SENSOR2PORT 11 // user sensor #2
|
||||
#define SENSOR3PORT 12 // user sensor #3
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ typedef std::chrono::duration<long long int, std::ratio<1, 1000>>
|
||||
|
||||
TaskHandle_t timeSyncReqTask = NULL;
|
||||
|
||||
static uint8_t time_sync_seqNo = 0;
|
||||
static uint8_t time_sync_seqNo = (uint8_t)random(TIMEREQUEST_MAX_SEQNO);
|
||||
static bool timeSyncPending = false;
|
||||
static myClock_timepoint time_sync_tx[TIME_SYNC_SAMPLES];
|
||||
static myClock_timepoint time_sync_rx[TIME_SYNC_SAMPLES];
|
||||
|
||||
Reference in new issue
Block a user