chore(bw): tidy up Radio Setup menu (#4939)

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
philmoz
2024-05-30 15:59:15 +10:00
committed by GitHub
co-authored by Peter Feerick
parent e1b1b88f01
commit 9bdd5664a0
58 changed files with 1282 additions and 1587 deletions
+7 -7
View File
@@ -205,7 +205,7 @@ void menuModelTelemetry(event_t event)
break;
case ITEM_TELEMETRY_NEW_SENSOR:
lcdDrawText(0, y, STR_TELEMETRY_NEWSENSOR, attr);
lcdDrawText(INDENT_WIDTH, y, STR_TELEMETRY_NEWSENSOR, attr);
if (attr && event==EVT_KEY_BREAK(KEY_ENTER)) {
s_editMode = 0;
int res = availableTelemetryIndex();
@@ -231,7 +231,7 @@ void menuModelTelemetry(event_t event)
break;
case ITEM_TELEMETRY_IGNORE_SENSOR_INSTANCE:
g_model.ignoreSensorIds = editCheckBox(g_model.ignoreSensorIds, TELEM_COL2, y, STR_IGNORE_INSTANCE, attr, event);
g_model.ignoreSensorIds = editCheckBox(g_model.ignoreSensorIds, TELEM_COL2, y, STR_IGNORE_INSTANCE, attr, event, INDENT_WIDTH);
break;
case ITEM_TELEMETRY_RSSI_LABEL:
@@ -242,7 +242,7 @@ void menuModelTelemetry(event_t event)
case ITEM_TELEMETRY_RSSI_ALARM2:
{
bool warning = (k==ITEM_TELEMETRY_RSSI_ALARM1);
lcdDrawTextAlignedLeft(y, (warning ? STR_LOWALARM : STR_CRITICALALARM));
lcdDrawTextIndented(y, (warning ? STR_LOWALARM : STR_CRITICALALARM));
lcdDrawNumber(TELEM_COL3, y, warning? g_model.rfAlarms.warning : g_model.rfAlarms.critical, attr, 3);
if (attr && s_editMode>0) {
if (warning)
@@ -254,7 +254,7 @@ void menuModelTelemetry(event_t event)
}
case ITEM_TELEMETRY_DISABLE_ALARMS:
g_model.disableTelemetryWarning = editCheckBox(g_model.disableTelemetryWarning, TELEM_COL3, y, STR_DISABLE_ALARM, attr, event);
g_model.disableTelemetryWarning = editCheckBox(g_model.disableTelemetryWarning, TELEM_COL3, y, STR_DISABLE_ALARM, attr, event, INDENT_WIDTH);
break;
#if defined(VARIO)
@@ -263,7 +263,7 @@ void menuModelTelemetry(event_t event)
break;
case ITEM_TELEMETRY_VARIO_SOURCE:
lcdDrawTextAlignedLeft(y, INDENT TR_SOURCE);
lcdDrawTextIndented(y, STR_SOURCE);
drawSource(TELEM_COL2, y, g_model.varioData.source ? MIXSRC_FIRST_TELEM+3*(g_model.varioData.source-1) : 0, attr);
if (attr) {
g_model.varioData.source = checkIncDec(event, g_model.varioData.source, 0, MAX_TELEMETRY_SENSORS, EE_MODEL|NO_INCDEC_MARKS, isVarioSensorAvailable);
@@ -271,7 +271,7 @@ void menuModelTelemetry(event_t event)
break;
case ITEM_TELEMETRY_VARIO_RANGE:
lcdDrawTextAlignedLeft(y, STR_RANGE);
lcdDrawTextIndented(y, STR_RANGE);
if (attr && CURSOR_ON_LINE()) {
lcdDrawSolidFilledRect(TELEM_COL2-1, y-1, LCD_W-TELEM_COL2+1, FH+1);
}
@@ -290,7 +290,7 @@ void menuModelTelemetry(event_t event)
break;
case ITEM_TELEMETRY_VARIO_CENTER:
lcdDrawTextAlignedLeft(y, STR_CENTER);
lcdDrawTextIndented(y, STR_CENTER);
lcdDrawNumber(TELEM_COL2, y, -5+g_model.varioData.centerMin, ((CURSOR_ON_LINE() || menuHorizontalPosition==0) ? attr : 0)|PREC1|LEFT);
lcdDrawNumber(TELEM_COL2+4*FW, y, 5+g_model.varioData.centerMax, ((CURSOR_ON_LINE() || menuHorizontalPosition==1) ? attr : 0)|PREC1|LEFT);
lcdDrawTextAtIndex(TELEM_COL2+8*FW, y, STR_VVARIOCENTER, g_model.varioData.centerSilent, (menuHorizontalPosition==2 ? attr : 0));