fix(sim): initial state for customisable switches not set correctly (#5797)

This commit is contained in:
philmoz
2025-01-19 12:24:02 +10:00
committed by GitHub
parent cce416b8df
commit 125738b5f9
+13 -3
View File
@@ -162,6 +162,10 @@ void checkValidMCU(void)
#endif
}
#if defined(SIMU)
static bool evalFSok = false;
#endif
void timer_10ms()
{
DEBUG_TIMER_START(debugTimerPer10ms);
@@ -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()) {
@@ -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)