From afd85fc26f41d74d7838b92b61c092ba22db3dfc Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 10 Jul 2023 12:29:34 +0200 Subject: [PATCH] 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) --- radio/src/io/multi_protolist.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/radio/src/io/multi_protolist.cpp b/radio/src/io/multi_protolist.cpp index 126dfdf22a4..d8aefc95c90 100644 --- a/radio/src/io/multi_protolist.cpp +++ b/radio/src/io/multi_protolist.cpp @@ -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) {