Skip to content

Commit b49867e

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 cafce5a commit b49867e

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
@@ -247,6 +247,12 @@ bool MultiRfProtocols::triggerScan()
247247
scanTimer->timer = xTimerCreateStatic(
248248
"MPM", MULTI_PROTOLIST_START_TIMEOUT / RTOS_MS_PER_TICK, pdTRUE,
249249
(void*)moduleIdx, MultiRfProtocols::timerCb, &scanTimer->timerBuffer);
250+
} else {
251+
if (xTimerChangePeriod(scanTimer->timer,
252+
MULTI_PROTOLIST_START_TIMEOUT / RTOS_MS_PER_TICK,
253+
0) != pdPASS) {
254+
/* The timer period could not be reset. */
255+
}
250256
}
251257

252258
if (scanTimer->timer) {

0 commit comments

Comments
 (0)