More unneeded definitions removed
This commit is contained in:
@@ -309,11 +309,7 @@ void showAlertBox(const char * title, const char * text, const char * action , u
|
||||
#define LOAD_MODEL_BITMAP()
|
||||
|
||||
#define IS_MAIN_VIEW_DISPLAYED() menuHandlers[0] == menuMainView
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
#define IS_TELEMETRY_VIEW_DISPLAYED() menuHandlers[0] == menuViewTelemetryFrsky
|
||||
#else
|
||||
#define IS_TELEMETRY_VIEW_DISPLAYED() false
|
||||
#endif
|
||||
#define IS_OTHER_VIEW_DISPLAYED() false
|
||||
|
||||
void editCurveRef(coord_t x, coord_t y, CurveRef & curve, event_t event, LcdFlags flags);
|
||||
|
||||
@@ -101,7 +101,7 @@ enum MenuModelIndexes {
|
||||
#if defined(LUA_MODEL_SCRIPTS)
|
||||
MENU_MODEL_CUSTOM_SCRIPTS,
|
||||
#endif
|
||||
CASE_FRSKY(MENU_MODEL_TELEMETRY_FRSKY)
|
||||
MENU_MODEL_TELEMETRY,
|
||||
MENU_MODEL_DISPLAY,
|
||||
MENU_MODEL_PAGES_COUNT
|
||||
};
|
||||
@@ -124,7 +124,7 @@ void menuModelGVars(event_t event);
|
||||
void menuModelLogicalSwitches(event_t event);
|
||||
void menuModelSpecialFunctions(event_t event);
|
||||
void menuModelCustomScripts(event_t event);
|
||||
void menuModelTelemetryFrsky(event_t event);
|
||||
void menuModelTelemetry(event_t event);
|
||||
void menuModelSensor(event_t event);
|
||||
void menuModelDisplay(event_t event);
|
||||
void menuModelTemplates(event_t event);
|
||||
@@ -144,7 +144,7 @@ static const MenuHandlerFunc menuTabModel[] = {
|
||||
#if defined(LUA_MODEL_SCRIPTS)
|
||||
menuModelCustomScripts,
|
||||
#endif
|
||||
CASE_FRSKY(menuModelTelemetryFrsky)
|
||||
menuModelTelemetry,
|
||||
menuModelDisplay,
|
||||
};
|
||||
|
||||
|
||||
@@ -154,7 +154,6 @@ void menuModelLogicalSwitchOne(event_t event)
|
||||
INCDEC_ENABLE_CHECK(isSourceAvailable);
|
||||
}
|
||||
else {
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
if (v1_val >= MIXSRC_FIRST_TELEM) {
|
||||
drawSourceCustomValue(CSWONE_2ND_COLUMN, y, v1_val, convertLswTelemValue(cs), attr|LEFT);
|
||||
v2_max = maxTelemValue(v1_val - MIXSRC_FIRST_TELEM + 1);
|
||||
@@ -171,7 +170,6 @@ void menuModelLogicalSwitchOne(event_t event)
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif // TELEMETRY_FRSKY
|
||||
{
|
||||
LcdFlags lf = attr | LEFT;
|
||||
getMixSrcRange(v1_val, v2_min, v2_max, &lf);
|
||||
|
||||
@@ -118,9 +118,9 @@ void onDeleteAllSensorsConfirm(const char * result)
|
||||
}
|
||||
}
|
||||
|
||||
void menuModelTelemetryFrsky(event_t event)
|
||||
void menuModelTelemetry(event_t event)
|
||||
{
|
||||
MENU(STR_MENUTELEMETRY, menuTabModel, MENU_MODEL_TELEMETRY_FRSKY, HEADER_LINE+ITEM_TELEMETRY_MAX, { HEADER_LINE_COLUMNS TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
|
||||
MENU(STR_MENUTELEMETRY, menuTabModel, MENU_MODEL_TELEMETRY, HEADER_LINE+ITEM_TELEMETRY_MAX, { HEADER_LINE_COLUMNS TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
|
||||
|
||||
uint8_t sub = menuVerticalPosition - HEADER_LINE;
|
||||
|
||||
|
||||
@@ -529,7 +529,7 @@ void menuRadioSetup(event_t event)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_FRSKY) && defined(GPS)
|
||||
#if defined(GPS)
|
||||
case ITEM_RADIO_SETUP_TIMEZONE:
|
||||
lcdDrawTextAlignedLeft(y, STR_TIMEZONE);
|
||||
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.timezone, attr|LEFT);
|
||||
|
||||
@@ -47,15 +47,12 @@
|
||||
#define TRIM_LH_POS (TRIM_LH_X-4*FW)
|
||||
#define TRIM_RH_NEG (TRIM_RH_X+1*FW)
|
||||
#define TRIM_RH_POS (TRIM_RH_X-4*FW)
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
#define RSSSI_X (30)
|
||||
#define RSSSI_Y (31)
|
||||
#define RSSI_MAX 105
|
||||
#endif
|
||||
|
||||
#define TRIM_LEN 23
|
||||
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
void drawRSSIGauge()
|
||||
{
|
||||
uint8_t bar = (RSSI_MAX - g_model.rssiAlarms.getWarningRssi()) / 4;
|
||||
@@ -66,7 +63,6 @@ void drawRSSIGauge()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void drawPotsBars()
|
||||
{
|
||||
@@ -276,15 +272,11 @@ void onMainViewMenu(const char *result)
|
||||
POPUP_MENU_ADD_ITEM(STR_RESET_TIMER1);
|
||||
POPUP_MENU_ADD_ITEM(STR_RESET_TIMER2);
|
||||
POPUP_MENU_ADD_ITEM(STR_RESET_TIMER3);
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
POPUP_MENU_ADD_ITEM(STR_RESET_TELEMETRY);
|
||||
#endif
|
||||
}
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
else if (result == STR_RESET_TELEMETRY) {
|
||||
telemetryReset();
|
||||
}
|
||||
#endif
|
||||
else if (result == STR_RESET_FLIGHT) {
|
||||
flightReset();
|
||||
}
|
||||
@@ -385,11 +377,7 @@ void menuMainView(event_t event)
|
||||
#endif
|
||||
|
||||
case EVT_KEY_TELEMETRY:
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
chainMenu(menuViewTelemetryFrsky);
|
||||
#else
|
||||
chainMenu(menuStatisticsDebug);
|
||||
#endif
|
||||
killEvents(event);
|
||||
break;
|
||||
|
||||
@@ -419,12 +407,10 @@ void menuMainView(event_t event)
|
||||
// Trims sliders
|
||||
displayTrims(mode);
|
||||
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
// RSSI gauge
|
||||
if (TELEMETRY_RSSI() > 0) {
|
||||
drawRSSIGauge();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (view_base < VIEW_INPUTS) {
|
||||
|
||||
@@ -37,7 +37,7 @@ const MenuHandlerFunc menuTabModel[] = {
|
||||
#if defined(LUA_MODEL_SCRIPTS)
|
||||
menuModelCustomScripts,
|
||||
#endif
|
||||
CASE_FRSKY(menuModelTelemetryFrsky)
|
||||
menuModelTelemetry,
|
||||
menuModelDisplay
|
||||
};
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ enum MenuModelIndexes {
|
||||
#if defined(LUA_MODEL_SCRIPTS)
|
||||
MENU_MODEL_CUSTOM_SCRIPTS,
|
||||
#endif
|
||||
MENU_MODEL_TELEMETRY_FRSKY,
|
||||
MENU_MODEL_TELEMETRY,
|
||||
MENU_MODEL_DISPLAY,
|
||||
MENU_MODEL_PAGES_COUNT
|
||||
};
|
||||
@@ -117,7 +117,7 @@ void menuModelGVars(event_t event);
|
||||
void menuModelLogicalSwitches(event_t event);
|
||||
void menuModelSpecialFunctions(event_t event);
|
||||
void menuModelCustomScripts(event_t event);
|
||||
void menuModelTelemetryFrsky(event_t event);
|
||||
void menuModelTelemetry(event_t event);
|
||||
void menuModelSensor(event_t event);
|
||||
void menuModelDisplay(event_t event);
|
||||
|
||||
|
||||
@@ -99,9 +99,9 @@ void onDeleteAllSensorsConfirm(const char * result)
|
||||
}
|
||||
}
|
||||
|
||||
void menuModelTelemetryFrsky(event_t event)
|
||||
void menuModelTelemetry(event_t event)
|
||||
{
|
||||
MENU(STR_MENUTELEMETRY, menuTabModel, MENU_MODEL_TELEMETRY_FRSKY, HEADER_LINE+ITEM_TELEMETRY_MAX, { HEADER_LINE_COLUMNS TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
|
||||
MENU(STR_MENUTELEMETRY, menuTabModel, MENU_MODEL_TELEMETRY, HEADER_LINE+ITEM_TELEMETRY_MAX, { HEADER_LINE_COLUMNS TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
|
||||
|
||||
uint8_t sub = menuVerticalPosition - HEADER_LINE;
|
||||
|
||||
|
||||
@@ -484,7 +484,7 @@ void menuRadioSetup(event_t event)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_FRSKY) && defined(GPS)
|
||||
#if defined(GPS)
|
||||
case ITEM_RADIO_SETUP_LABEL_GPS:
|
||||
lcdDrawTextAlignedLeft(y, STR_GPS);
|
||||
break;
|
||||
|
||||
@@ -36,7 +36,7 @@ const MenuHandlerFunc menuTabModel[] = {
|
||||
#if defined(LUA_MODEL_SCRIPTS)
|
||||
menuModelCustomScripts,
|
||||
#endif
|
||||
CASE_FRSKY(menuModelTelemetryFrsky)
|
||||
menuModelTelemetry
|
||||
};
|
||||
|
||||
void editCurveRef(coord_t x, coord_t y, CurveRef & curve, event_t event, LcdFlags attr);
|
||||
|
||||
@@ -123,7 +123,7 @@ enum EnumTabModel {
|
||||
#if defined(LUA_MODEL_SCRIPTS)
|
||||
MENU_MODEL_CUSTOM_SCRIPTS,
|
||||
#endif
|
||||
CASE_FRSKY(MENU_MODEL_TELEMETRY_FRSKY)
|
||||
MENU_MODEL_TELEMETRY,
|
||||
MENU_MODEL_PAGES_COUNT
|
||||
};
|
||||
|
||||
@@ -177,7 +177,7 @@ bool menuModelGVars(event_t event);
|
||||
bool menuModelLogicalSwitches(event_t event);
|
||||
bool menuModelSpecialFunctions(event_t event);
|
||||
bool menuModelCustomScripts(event_t event);
|
||||
bool menuModelTelemetryFrsky(event_t event);
|
||||
bool menuModelTelemetry(event_t event);
|
||||
bool menuModelSensor(event_t event);
|
||||
bool menuModelExpoOne(event_t event);
|
||||
bool menuModelModuleOptions(event_t event);
|
||||
|
||||
@@ -103,9 +103,9 @@ void onDeleteAllSensorsConfirm(const char * result)
|
||||
}
|
||||
}
|
||||
|
||||
bool menuModelTelemetryFrsky(event_t event)
|
||||
bool menuModelTelemetry(event_t event)
|
||||
{
|
||||
MENU(STR_MENUTELEMETRY, MODEL_ICONS, menuTabModel, MENU_MODEL_TELEMETRY_FRSKY, ITEM_TELEMETRY_MAX, { TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
|
||||
MENU(STR_MENUTELEMETRY, MODEL_ICONS, menuTabModel, MENU_MODEL_TELEMETRY, ITEM_TELEMETRY_MAX, { TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
|
||||
|
||||
for (uint8_t i=0; i<NUM_BODY_LINES; i++) {
|
||||
coord_t y = MENU_CONTENT_TOP + i*FH;
|
||||
|
||||
@@ -581,7 +581,7 @@ void menuRadioHardware(event_t event)
|
||||
lcdDrawTextAlignedLeft(y, STR_DEBUG);
|
||||
lcdDrawText(HW_SETTINGS_COLUMN2, y, STR_ANALOGS_BTN, menuHorizontalPosition == 0 ? attr : 0);
|
||||
lcdDrawText(lcdLastRightPos + 2, y, STR_KEYS_BTN, menuHorizontalPosition == 1 ? attr : 0);
|
||||
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
|
||||
if (attr && event == EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
if (menuHorizontalPosition == 0)
|
||||
pushMenu(menuRadioDiagAnalogs);
|
||||
else
|
||||
@@ -591,7 +591,7 @@ void menuRadioHardware(event_t event)
|
||||
|
||||
case ITEM_RADIO_BACKUP_EEPROM:
|
||||
lcdDrawText(LCD_W / 2, y, BUTTON(STR_EEBACKUP), attr | CENTERED);
|
||||
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
|
||||
if (attr && event == EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
s_editMode = EDIT_SELECT_FIELD;
|
||||
eepromBackup();
|
||||
}
|
||||
@@ -599,7 +599,7 @@ void menuRadioHardware(event_t event)
|
||||
|
||||
case ITEM_RADIO_FACTORY_RESET:
|
||||
lcdDrawText(LCD_W / 2, y, BUTTON(STR_FACTORYRESET), attr | CENTERED);
|
||||
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
|
||||
if (attr && event == EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
s_editMode = EDIT_SELECT_FIELD;
|
||||
POPUP_CONFIRMATION(STR_CONFIRMRESET, onFactoryResetConfirm);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
constexpr uint8_t COLUMN2_X = 10 * FW;
|
||||
|
||||
|
||||
void menuRadioFirmwareOptions(event_t event)
|
||||
{
|
||||
title(STR_MENU_FIRM_OPTIONS);
|
||||
|
||||
@@ -233,12 +233,10 @@ bool isSourceAvailableInCustomSwitches(int source)
|
||||
{
|
||||
bool result = isSourceAvailable(source);
|
||||
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
if (result && source >= MIXSRC_FIRST_TELEM && source <= MIXSRC_LAST_TELEM) {
|
||||
div_t qr = div(source - MIXSRC_FIRST_TELEM, 3);
|
||||
result = isTelemetryFieldComparisonAvailable(qr.quot);
|
||||
}
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user