From 4426f56cb9cbf2090ed4eafaaf834b2040c3d474 Mon Sep 17 00:00:00 2001 From: 3djc Date: Mon, 2 Sep 2024 01:45:27 +0200 Subject: [PATCH] fix: register activity on CS changes (#5490) --- radio/src/switches.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radio/src/switches.cpp b/radio/src/switches.cpp index d0d047bb8ad..7ab89001613 100644 --- a/radio/src/switches.cpp +++ b/radio/src/switches.cpp @@ -27,7 +27,7 @@ #include "edgetx_constants.h" #include "switches.h" #include "input_mapping.h" - +#include "inactivity_timer.h" #include "tasks/mixer_task.h" #define CS_LAST_VALUE_INIT -32768 @@ -169,6 +169,7 @@ void evalFunctionSwitches() uint8_t physicalState = getFSPhysicalState(i); if (physicalState != getFSPreviousPhysicalState(i)) { // FS was moved + inactivityTimerReset(ActivitySource::MainControls); if ((FSWITCH_CONFIG(i) == SWITCH_2POS && physicalState == 1) || (FSWITCH_CONFIG(i) == SWITCH_TOGGLE)) { if (IS_FSWITCH_GROUP_ON(FSWITCH_GROUP(i)) != 0) {