feat(radio): refactor of switch handling to better support customisable switches (#6095)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com> Co-authored-by: 3djc <3djc@gh.com> Co-authored-by: elecpower <elecpower@users.noreply.github.com>
This commit is contained in:
co-authored by
philmoz
3djc
elecpower
parent
28833f42e6
commit
0c8c39b134
+2
-2
@@ -1452,11 +1452,11 @@ int cliDisplay(const char ** argv)
|
||||
cliSerialPrint("[Trim %s] = %s", getTrimLabel(i),
|
||||
keysGetTrimState(i) ? "on" : "off");
|
||||
}
|
||||
for (int i = 0; i < switchGetMaxSwitches(); i++) {
|
||||
for (int i = 0; i < switchGetMaxAllSwitches(); i++) {
|
||||
if (SWITCH_EXISTS(i)) {
|
||||
static const char * const SWITCH_POSITIONS[] = { "up", "mid", "down" };
|
||||
auto pos = switchGetPosition(i);
|
||||
cliSerialPrint("[%s] = %s", switchGetName(i), SWITCH_POSITIONS[pos]);
|
||||
cliSerialPrint("[%s] = %s", switchGetDefaultName(i), SWITCH_POSITIONS[pos]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user