Skip to content

Commit

Permalink
fix: register activity on CS changes (#5490)
Browse files Browse the repository at this point in the history
  • Loading branch information
3djc authored and pfeerick committed Sep 8, 2024
1 parent 7ec993c commit aed3dc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radio/src/switches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "opentx.h"
#include "switches.h"
#include "input_mapping.h"

#include "inactivity_timer.h"
#include "tasks/mixer_task.h"

#define CS_LAST_VALUE_INIT -32768
Expand Down Expand Up @@ -148,6 +148,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) {
Expand Down

0 comments on commit aed3dc3

Please sign in to comment.