Skip to content

Commit afd85fc

Browse files
mha1pfeerick
authored andcommitted
fix: Reset proto scan software timer to MULTI_PROTOLIST_START_TIMEOUT (#3763)
reset proto scan software timer to MULTI_PROTOLIST_START_TIMEOUT if timer already exists (from previous scan)
1 parent a8c4a9a commit afd85fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

radio/src/io/multi_protolist.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ bool MultiRfProtocols::triggerScan()
233233
scanTimer->timer = xTimerCreateStatic(
234234
"MPM", MULTI_PROTOLIST_START_TIMEOUT / RTOS_MS_PER_TICK, pdTRUE,
235235
(void*)moduleIdx, MultiRfProtocols::timerCb, &scanTimer->timerBuffer);
236+
} else {
237+
if (xTimerChangePeriod(scanTimer->timer,
238+
MULTI_PROTOLIST_START_TIMEOUT / RTOS_MS_PER_TICK,
239+
0) != pdPASS) {
240+
/* The timer period could not be reset. */
241+
}
236242
}
237243

238244
if (scanTimer->timer) {

0 commit comments

Comments
 (0)