fix(sim): initial state for customisable switches not set correctly (#5797)
This commit is contained in:
+13
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user