From fc6ad808ad6d07fce94206bf588dc241b2652b05 Mon Sep 17 00:00:00 2001 From: 3djc Date: Sat, 10 Jun 2023 11:30:41 +0200 Subject: [PATCH] Fix BW default switch warning --- radio/src/model_init.cpp | 7 ++++++- radio/src/myeeprom.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/radio/src/model_init.cpp b/radio/src/model_init.cpp index acd2e9625..5d190f49f 100644 --- a/radio/src/model_init.cpp +++ b/radio/src/model_init.cpp @@ -125,9 +125,14 @@ void applyDefaultTemplate() g_model.switchWarningState |= (1 << (3 * i)); } } +#else + // enable switch warnings + for (int i = 0; i < MAX_SWITCHES; i++) { + if (SWITCH_WARNING_ALLOWED(i)) + g_model.switchWarningState |= (1 << (3 * i)); + } #endif - // TODO: what about switch warnings in non-color LCD radios? } diff --git a/radio/src/myeeprom.h b/radio/src/myeeprom.h index 0539a59a2..909825314 100644 --- a/radio/src/myeeprom.h +++ b/radio/src/myeeprom.h @@ -25,6 +25,7 @@ #include "datastructs.h" #include "libopenui/src/bitfield.h" #include "storage/yaml/yaml_defs.h" +#include "hal/switch_driver.h" #if defined(SDCARD_YAML) #define EEPROM_VER 221