Remove redundant code/feature (#7368)

Remove redundant code/feature
This commit is contained in:
3djc
2020-02-12 16:53:21 +01:00
committed by GitHub
parent 0cbb8107af
commit f40264b658
4 changed files with 13 additions and 47 deletions
+12 -2
View File
@@ -29,7 +29,7 @@ bool menuRadioDiagAnalogs(event_t event)
{
SIMPLE_SUBMENU(STR_MENU_RADIO_ANALOGS, ICON_MODEL_SETUP, 0);
for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
for (uint8_t i = 0; i < NUM_ANALOGS; i++) {
coord_t y = MENU_HEADER_HEIGHT + 1 + (i / 2) * FH;
uint8_t x = i & 1 ? LCD_W / 2 + 10 : LEFT_NAME_COLUMN;
lcdDrawNumber(x, y, i + 1, LEADING0 | LEFT, 2);
@@ -40,7 +40,12 @@ bool menuRadioDiagAnalogs(event_t event)
lcdDrawNumber(x + ANA_OFFSET + 30 - 1, y, avgJitter[i].get(), RIGHT);
lcdDrawNumber(x + ANA_OFFSET + 70 - 1, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT);
#else
lcdDrawNumber(x + ANA_OFFSET - 1, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT);
if (i < NUM_STICKS + NUM_POTS + NUM_SLIDERS)
lcdDrawNumber(x + ANA_OFFSET - 1, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT);
#if NUM_MOUSE_ANALOGS > 0
else if (i >= MOUSE1)
lcdDrawNumber(x + ANA_OFFSET - 1, y, (int16_t) calibratedAnalogs[CALIBRATED_MOUSE1 + i - MOUSE1] * 25 / 256, RIGHT);
#endif
#endif
}
@@ -51,5 +56,10 @@ bool menuRadioDiagAnalogs(event_t event)
lcdDrawText(LCD_W / 2, RAS_TOP_POSITION, "XJTVER : ");
lcdDrawNumber(lcdNextPos, RAS_TOP_POSITION, telemetryData.xjtVersion, 0);
}
#if (NUM_PWMSTICKS > 0) && !defined(SIMU)
lcdDrawText(MENUS_MARGIN_LEFT, MENU_CONTENT_TOP + 8 * FH, STICKS_PWM_ENABLED() ? "Sticks: PWM" : "Sticks: ANA");
#endif
return true;
}