chore(color): implement publish/subscribe messaging to simplify code and further code consolidation (#7032)

This commit is contained in:
philmoz
2026-01-29 15:45:10 +10:00
committed by GitHub
parent 2579bc6132
commit 9a44335601
125 changed files with 1701 additions and 2054 deletions
+15 -1
View File
@@ -95,6 +95,10 @@ uint8_t isSwitch3Pos(uint8_t idx)
return IS_CONFIG_3POS(idx);
}
#if defined(SIMU)
bool evalFSok = false;
#endif
void setFSStartupPosition()
{
for (uint8_t i = 0; i < switchGetMaxSwitches(); i++) {
@@ -118,6 +122,10 @@ void setFSStartupPosition()
}
}
}
#if defined(SIMU)
evalFSok = true;
#endif
}
void setFSLogicalState(uint8_t index, uint8_t value)
@@ -159,6 +167,10 @@ bool isFSGroupUsed(uint8_t index)
void evalFunctionSwitches()
{
#if defined(SIMU)
if (!evalFSok) return;
#endif
for (uint8_t i = 0; i < switchGetMaxSwitches(); i++) {
if (switchIsCustomSwitch(i)) {
if (g_model.getSwitchType(i) == SWITCH_NONE) {
@@ -884,7 +896,9 @@ void checkSwitches()
LED_ERROR_BEGIN();
auto dialog = new SwitchWarnDialog();
dialog->runForever();
MainWindow::instance()->blockUntilClose(true, [=]() {
return dialog->deleted();
});
LED_ERROR_END();
}
#elif defined(GUI)