fix: configure default switch warning for customizable switches (#6636)

This commit is contained in:
3djc
2025-10-07 15:28:42 +10:00
committed by GitHub
parent 6235f012f6
commit 98c1732453
+14 -1
View File
@@ -142,9 +142,22 @@ void applyDefaultTemplate()
#endif
// enable switch warnings
bool sw1found = false;
UNUSED(sw1found);
for (uint64_t i = 0; i < switchGetMaxAllSwitches(); i++) {
if (SWITCH_WARNING_ALLOWED(i))
if (SWITCH_WARNING_ALLOWED(i)) {
#if defined(FUNCTION_SWITCHES)
if (switchIsCustomSwitch(i) && !sw1found) {
g_model.setSwitchWarning(i, 3);
sw1found = true;
} else {
g_model.setSwitchWarning(i, 1);
}
}
#else
g_model.setSwitchWarning(i, 1);
}
#endif
}
#if defined(USE_HATS_AS_KEYS)