add gCLS_DEVICE_ADDRESS to the HB interval to avoid collisons
This commit is contained in:
3
CLS.c
3
CLS.c
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user