feat: Add trainer virtual switch (#3937)
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
@@ -47,13 +47,14 @@ class SwitchChoiceMenuToolbar : public MenuToolbar
|
||||
#if defined(DEBUG_LATENCY)
|
||||
auto lastSource = SWSRC_LATENCY_TOGGLE;
|
||||
#else
|
||||
auto lastSource = SWSRC_RADIO_ACTIVITY;
|
||||
auto lastSource = SWSRC_TRAINER_CONNECTED;
|
||||
#endif
|
||||
addButton(
|
||||
STR_CHAR_FUNCTION, SWSRC_ON, lastSource,
|
||||
[=](int16_t index) {
|
||||
index = abs(index);
|
||||
return index == 0 || index == SWSRC_ON || index == SWSRC_ONE ||
|
||||
index == SWSRC_TRAINER_CONNECTED ||
|
||||
(index >= SWSRC_TELEMETRY_STREAMING && index <= lastSource &&
|
||||
!(index >= SWSRC_FIRST_SENSOR && index <= SWSRC_LAST_SENSOR));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user