From 3395c0841a9cc3ccbec049524d79cfd42cace802 Mon Sep 17 00:00:00 2001 From: Michael <101.37584@germanynet.de> Date: Wed, 5 Jul 2023 10:41:03 +0200 Subject: [PATCH] fixes #3084 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) {