add gCLS_DEVICE_ADDRESS to the HB interval to avoid collisons

This commit is contained in:
2024-04-30 02:37:16 +02:00
parent bcfcba5bb9
commit a9cfa7bc5e

3
CLS.c
View File

@@ -38,7 +38,8 @@ void CLS_Init(void) {
CLS_HeatbeatTimerId = osTimerNew((osTimerFunc_t)CLS_Heatbeat, osTimerPeriodic, NULL, &timerAttr);
if (CLS_HeatbeatTimerId != NULL) { // Timer object created
if (osTimerStart(CLS_HeatbeatTimerId, CLS_HEARTBEAT_INTERVAL_MS) == osOK) { // Timer started
// add gCLS_DEVICE_ADDRESS to the interval to avoid collisons
if (osTimerStart(CLS_HeatbeatTimerId, CLS_HEARTBEAT_INTERVAL_MS + gCLS_DEVICE_ADDRESS) == osOK) { // Timer started
// Timer started successfully
}
}