Display non selected RSSI source as default
This commit is contained in:
@@ -247,12 +247,15 @@ void menuModelTelemetry(event_t event)
|
||||
|
||||
case ITEM_TELEMETRY_RSSI_SOURCE: {
|
||||
lcdDrawTextAlignedLeft(y, INDENT TR_SOURCE);
|
||||
drawSource(TELEM_COL2, y, g_model.rssiSource ? MIXSRC_FIRST_TELEM + 3 * (g_model.rssiSource - 1) : 0, attr);
|
||||
if (g_model.rssiSource) {
|
||||
drawSource(TELEM_COL2, y, g_model.rssiSource ? MIXSRC_FIRST_TELEM + 3 * (g_model.rssiSource - 1) : 0, attr);
|
||||
TelemetrySensor * sensor = &g_model.telemetrySensors[g_model.rssiSource - 1];
|
||||
lcdDrawText(lcdNextPos, y, " ", attr);
|
||||
drawReceiverName(lcdNextPos, y, sensor->frskyInstance.rxIndex >> 2, sensor->frskyInstance.rxIndex & 0x03, attr);
|
||||
}
|
||||
else {
|
||||
lcdDrawText(TELEM_COL2, y, STR_DEFAULT, attr);
|
||||
}
|
||||
if (attr) {
|
||||
g_model.rssiSource = checkIncDec(event, g_model.rssiSource, 0, MAX_TELEMETRY_SENSORS, EE_MODEL | NO_INCDEC_MARKS, isRssiSensorAvailable);
|
||||
}
|
||||
|
||||
@@ -238,12 +238,15 @@ void menuModelTelemetry(event_t event)
|
||||
|
||||
case ITEM_TELEMETRY_RSSI_SOURCE: {
|
||||
lcdDrawTextAlignedLeft(y, INDENT TR_SOURCE);
|
||||
drawSource(TELEM_COL2, y, g_model.rssiSource ? MIXSRC_FIRST_TELEM + 3 * (g_model.rssiSource - 1) : 0, attr);
|
||||
if (g_model.rssiSource) {
|
||||
drawSource(TELEM_COL2, y, g_model.rssiSource ? MIXSRC_FIRST_TELEM + 3 * (g_model.rssiSource - 1) : 0, attr);
|
||||
TelemetrySensor * sensor = &g_model.telemetrySensors[g_model.rssiSource - 1];
|
||||
lcdDrawText(lcdNextPos, y, " ", attr);
|
||||
drawReceiverName(lcdNextPos, y, sensor->frskyInstance.rxIndex >> 2, sensor->frskyInstance.rxIndex & 0x03, attr);
|
||||
}
|
||||
else {
|
||||
lcdDrawText(TELEM_COL2, y, STR_DEFAULT, attr);
|
||||
}
|
||||
if (attr) {
|
||||
g_model.rssiSource = checkIncDec(event, g_model.rssiSource, 0, MAX_TELEMETRY_SENSORS, EE_MODEL | NO_INCDEC_MARKS, isRssiSensorAvailable);
|
||||
}
|
||||
|
||||
@@ -228,12 +228,15 @@ bool menuModelTelemetry(event_t event)
|
||||
|
||||
case ITEM_TELEMETRY_RSSI_SOURCE: {
|
||||
lcdDrawText(MENUS_MARGIN_LEFT + INDENT_WIDTH, y, STR_SOURCE);
|
||||
drawSource(TELEM_COL2, y, g_model.rssiSource ? MIXSRC_FIRST_TELEM + 3 * (g_model.rssiSource - 1) : 0, attr);
|
||||
if (g_model.rssiSource) {
|
||||
if(g_model.rssiSource) {
|
||||
drawSource(TELEM_COL2, y, g_model.rssiSource ? MIXSRC_FIRST_TELEM + 3 * (g_model.rssiSource - 1) : 0, attr);
|
||||
TelemetrySensor * sensor = &g_model.telemetrySensors[g_model.rssiSource - 1];
|
||||
lcdDrawText(lcdNextPos, y, " ", attr);
|
||||
drawReceiverName(lcdNextPos, y, sensor->frskyInstance.rxIndex >> 2, sensor->frskyInstance.rxIndex & 0x03, attr);
|
||||
}
|
||||
else {
|
||||
lcdDrawText(TELEM_COL2, y, STR_DEFAULT, attr);
|
||||
w }
|
||||
if (attr) {
|
||||
g_model.rssiSource = checkIncDec(event, g_model.rssiSource, 0, MAX_TELEMETRY_SENSORS, EE_MODEL | NO_INCDEC_MARKS, isRssiSensorAvailable);
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ const char STR_SWITCH[] = TR_SWITCH;
|
||||
const char STR_TRIMS[] = TR_TRIMS;
|
||||
const char STR_FADEIN[] = TR_FADEIN;
|
||||
const char STR_FADEOUT[] = TR_FADEOUT;
|
||||
const char STR_DEFAULT[] = TR_DEFAULT;
|
||||
const char STR_CHECKTRIMS[] = TR_CHECKTRIMS;
|
||||
const char STR_MODE[] = TR_MODE;
|
||||
const char STR_NOFREEEXPO[] = TR_NOFREEEXPO;
|
||||
|
||||
@@ -220,6 +220,7 @@ extern const char STR_SWITCH[];
|
||||
extern const char STR_TRIMS[];
|
||||
extern const char STR_FADEIN[];
|
||||
extern const char STR_FADEOUT[];
|
||||
extern const char STR_DEFAULT[];
|
||||
extern const char STR_CHECKTRIMS[];
|
||||
extern const char STR_SWASHTYPE[];
|
||||
extern const char STR_COLLECTIVE[];
|
||||
|
||||
Reference in New Issue
Block a user