Skip to content

Commit

Permalink
fix: Reset proto scan software timer to MULTI_PROTOLIST_START_TIMEOUT (
Browse files Browse the repository at this point in the history
…#3763)

reset proto scan software timer to MULTI_PROTOLIST_START_TIMEOUT if timer already exists (from previous scan)
  • Loading branch information
mha1 authored and pfeerick committed Jul 10, 2023
1 parent a8c4a9a commit afd85fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions radio/src/io/multi_protolist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ bool MultiRfProtocols::triggerScan()
scanTimer->timer = xTimerCreateStatic(
"MPM", MULTI_PROTOLIST_START_TIMEOUT / RTOS_MS_PER_TICK, pdTRUE,
(void*)moduleIdx, MultiRfProtocols::timerCb, &scanTimer->timerBuffer);
} else {
if (xTimerChangePeriod(scanTimer->timer,
MULTI_PROTOLIST_START_TIMEOUT / RTOS_MS_PER_TICK,
0) != pdPASS) {
/* The timer period could not be reset. */
}
}

if (scanTimer->timer) {
Expand Down

0 comments on commit afd85fc

Please sign in to comment.