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 Sep 1, 2024
1 parent a904932 commit 4426f56
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 @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4426f56

Please sign in to comment.