diff --git a/radio/src/gui/colorlcd/model_logical_switches.cpp b/radio/src/gui/colorlcd/model_logical_switches.cpp index a6e7aa57f7f..d64d842d342 100644 --- a/radio/src/gui/colorlcd/model_logical_switches.cpp +++ b/radio/src/gui/colorlcd/model_logical_switches.cpp @@ -95,7 +95,7 @@ class LogicalSwitchEditPage: public Page LogicalSwitchData * cs = lswAddress(index); uint8_t cstate = lswFamily(cs->func); - if (cstate == LS_FAMILY_BOOL || cstate == LS_FAMILY_STICKY) { + if (cstate == LS_FAMILY_BOOL || cstate == LS_FAMILY_STICKY || cs->func == LS_FUNC_SAFE) { new StaticText(logicalSwitchOneWindow, grid.getLabelSlot(), STR_V1, 0, COLOR_THEME_PRIMARY1); auto choice = new SwitchChoice(logicalSwitchOneWindow, grid.getFieldSlot(), SWSRC_FIRST_IN_LOGICAL_SWITCHES, SWSRC_LAST_IN_LOGICAL_SWITCHES, GET_SET_DEFAULT(cs->v1)); choice->setAvailableHandler(isSwitchAvailableInLogicalSwitches); @@ -292,7 +292,7 @@ class LogicalSwitchButton : public Button dc->drawTextAtIndex(col1, line1, STR_VCSWFUNC, ls->func, COLOR_THEME_SECONDARY1); // CSW params - if (lsFamily == LS_FAMILY_BOOL || lsFamily == LS_FAMILY_STICKY) { + if (lsFamily == LS_FAMILY_BOOL || lsFamily == LS_FAMILY_STICKY || ls->func ==LS_FUNC_SAFE) { drawSwitch(dc, col2, line1, ls->v1, COLOR_THEME_SECONDARY1); drawSwitch(dc, col3, line1, ls->v2, COLOR_THEME_SECONDARY1); } else if (lsFamily == LS_FAMILY_EDGE) { diff --git a/radio/src/storage/conversions/yaml/myeeprom_220.h b/radio/src/storage/conversions/yaml/myeeprom_220.h index 077811b5882..927001e5817 100644 --- a/radio/src/storage/conversions/yaml/myeeprom_220.h +++ b/radio/src/storage/conversions/yaml/myeeprom_220.h @@ -202,6 +202,7 @@ enum LogicalSwitchesFunctions { LS_FUNC_ADIFFEGREATER, LS_FUNC_TIMER, LS_FUNC_STICKY, + LS_FUNC_SAFE, LS_FUNC_COUNT, LS_FUNC_MAX = LS_FUNC_COUNT-1 }; diff --git a/radio/src/storage/yaml/yaml_datastructs_nv14.cpp b/radio/src/storage/yaml/yaml_datastructs_nv14.cpp index ac738379b3f..dc8603783a3 100644 --- a/radio/src/storage/yaml/yaml_datastructs_nv14.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_nv14.cpp @@ -180,6 +180,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_t12.cpp b/radio/src/storage/yaml/yaml_datastructs_t12.cpp index d309154e861..4f094fa8d8b 100644 --- a/radio/src/storage/yaml/yaml_datastructs_t12.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_t12.cpp @@ -170,6 +170,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_t8.cpp b/radio/src/storage/yaml/yaml_datastructs_t8.cpp index 06dda014002..5b3c5430cbc 100644 --- a/radio/src/storage/yaml/yaml_datastructs_t8.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_t8.cpp @@ -170,6 +170,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_tlite.cpp b/radio/src/storage/yaml/yaml_datastructs_tlite.cpp index 06dda014002..5b3c5430cbc 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tlite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tlite.cpp @@ -170,6 +170,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_tpro.cpp b/radio/src/storage/yaml/yaml_datastructs_tpro.cpp index e26e20077af..6c88549b6eb 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tpro.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tpro.cpp @@ -172,6 +172,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_tx12.cpp b/radio/src/storage/yaml/yaml_datastructs_tx12.cpp index 7c752a14110..967a305ed24 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tx12.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tx12.cpp @@ -170,6 +170,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x10.cpp b/radio/src/storage/yaml/yaml_datastructs_x10.cpp index 6900b745696..5e68f8c571d 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x10.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x10.cpp @@ -193,6 +193,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x12s.cpp b/radio/src/storage/yaml/yaml_datastructs_x12s.cpp index 019ebe1da5c..a4a04c5775d 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x12s.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x12s.cpp @@ -191,6 +191,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x7.cpp b/radio/src/storage/yaml/yaml_datastructs_x7.cpp index 06dda014002..5b3c5430cbc 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x7.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x7.cpp @@ -170,6 +170,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp index a62b007458e..a569bc4a9b9 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp @@ -174,6 +174,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp index d6b42af42d9..41e6b3d53ca 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp @@ -186,6 +186,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp b/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp index b12f418479a..bd2cb3a17f1 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp @@ -166,6 +166,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp b/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp index 3b0a05e5d0b..90598d01591 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp @@ -168,6 +168,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_xlite.cpp b/radio/src/storage/yaml/yaml_datastructs_xlite.cpp index e970bf285ca..d5c082bf5c2 100644 --- a/radio/src/storage/yaml/yaml_datastructs_xlite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_xlite.cpp @@ -168,6 +168,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp index 41b5bd04a8d..40697f626aa 100644 --- a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp @@ -170,6 +170,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = { diff --git a/radio/src/storage/yaml/yaml_datastructs_zorro.cpp b/radio/src/storage/yaml/yaml_datastructs_zorro.cpp index 96700f5cee3..ab1b75ffa28 100644 --- a/radio/src/storage/yaml/yaml_datastructs_zorro.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_zorro.cpp @@ -170,6 +170,7 @@ const struct YamlIdStr enum_LogicalSwitchesFunctions[] = { { LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" }, { LS_FUNC_TIMER, "FUNC_TIMER" }, { LS_FUNC_STICKY, "FUNC_STICKY" }, + { LS_FUNC_SAFE, "FUNC_SAFE" }, { 0, NULL } }; const struct YamlIdStr enum_SwashType[] = {