Skip to content

Commit

Permalink
fix(sim): initial state for customisable switches not set correctly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz authored Jan 19, 2025
1 parent cce416b commit 125738b
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions radio/src/edgetx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ void checkValidMCU(void)
#endif
}

#if defined(SIMU)
static bool evalFSok = false;
#endif

void timer_10ms()
{
DEBUG_TIMER_START(debugTimerPer10ms);
Expand Down Expand Up @@ -206,8 +210,13 @@ void timer_10ms()
}

#if defined(FUNCTION_SWITCHES)
#if defined(SIMU)
if (evalFSok)
evalFunctionSwitches();
#else
evalFunctionSwitches();
#endif
#endif

#if defined(ROTARY_ENCODER_NAVIGATION) && !defined(COLORLCD)
if (rotaryEncoderPollingCycle()) {
Expand Down Expand Up @@ -1518,9 +1527,10 @@ void edgeTxInit()
#endif

#if defined(FUNCTION_SWITCHES)
if (!UNEXPECTED_SHUTDOWN()) {
setFSStartupPosition();
}
setFSStartupPosition();
#if defined(SIMU)
evalFSok = true;
#endif
#endif

#if defined(GUI)
Expand Down

0 comments on commit 125738b

Please sign in to comment.