rename x3 to x9lite
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
#define MENUS_SCROLLBAR_WIDTH 0
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define HEADER_LINE 0
|
||||
#define HEADER_LINE_COLUMNS
|
||||
#else
|
||||
@@ -156,7 +156,7 @@ void title(const char * s);
|
||||
|
||||
#define MENU_TAB(...) const uint8_t mstate_tab[] = __VA_ARGS__
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define MENU_CHECK(tab, menu, lines_count) \
|
||||
check(event, menu, tab, DIM(tab), mstate_tab, DIM(mstate_tab)-1, lines_count)
|
||||
#else
|
||||
@@ -169,7 +169,7 @@ void title(const char * s);
|
||||
MENU_CHECK(tab, menu, lines_count); \
|
||||
TITLE(title)
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define SIMPLE_MENU_NOTITLE(tab, menu, lines_count) \
|
||||
check_simple(event, menu, tab, DIM(tab), lines_count);
|
||||
#define SUBMENU_NOTITLE(lines_count, ...) \
|
||||
@@ -289,7 +289,7 @@ void readModelNotes();
|
||||
#endif
|
||||
|
||||
// TODO enum
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define EDIT_MODE_INIT 0
|
||||
#else
|
||||
#define EDIT_MODE_INIT -1
|
||||
|
||||
@@ -198,7 +198,7 @@ void menuModelSelect(event_t event)
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
case EVT_KEY_LONG(KEY_PAGE):
|
||||
chainMenu(menuTabModel[DIM(menuTabModel)-1]);
|
||||
killEvents(event);
|
||||
@@ -230,7 +230,7 @@ void menuModelSelect(event_t event)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
case EVT_ROTARY_LEFT:
|
||||
case EVT_ROTARY_RIGHT:
|
||||
#endif
|
||||
@@ -271,7 +271,7 @@ void menuModelSelect(event_t event)
|
||||
lcdDrawNumber(17*FW, 0, reusableBuffer.modelsel.eepromfree, RIGHT);
|
||||
#endif
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
drawScreenIndex(MENU_MODEL_SELECT, DIM(menuTabModel), 0);
|
||||
#elif defined(ROTARY_ENCODER_NAVIGATION)
|
||||
drawScreenIndex(MENU_MODEL_SELECT, DIM(menuTabModel), (sub == g_eeGeneral.currModel) ? ((IS_ROTARY_ENCODER_NAVIGATION_ENABLE() && s_editMode < 0) ? INVERS|BLINK : INVERS) : 0);
|
||||
|
||||
@@ -126,7 +126,7 @@ enum MenuModelSetupItems {
|
||||
ITEM_MODEL_TRAINER_LABEL,
|
||||
ITEM_MODEL_TRAINER_MODE,
|
||||
#endif
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#if defined(BLUETOOTH)
|
||||
ITEM_MODEL_TRAINER_BLUETOOTH,
|
||||
#endif
|
||||
@@ -195,7 +195,7 @@ enum MenuModelSetupItems {
|
||||
#define EXTRA_MODULE_ROWS
|
||||
#endif
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define ANTENNA_ROW
|
||||
#if defined(BLUETOOTH)
|
||||
#define TRAINER_BLUETOOTH_M_ROW ((bluetooth.distantAddr[0] == '\0' || bluetooth.state == BLUETOOTH_STATE_CONNECTED) ? (uint8_t)0 : (uint8_t)1)
|
||||
@@ -1281,7 +1281,7 @@ void menuModelSetup(event_t event)
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
case ITEM_MODEL_TRAINER_PARAMS:
|
||||
lcdDrawTextAlignedLeft(y, STR_PPMFRAME);
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_MS);
|
||||
|
||||
@@ -388,7 +388,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
||||
else if (attr) {
|
||||
REPEAT_LAST_CURSOR_MOVE();
|
||||
}
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
if (active || event==EVT_KEY_LONG(KEY_ENTER)) {
|
||||
CFN_PARAM(cfn) = CHECK_INCDEC_PARAM(event, val_displayed, val_min, val_max);
|
||||
if (func == FUNC_ADJUST_GVAR && attr && event==EVT_KEY_LONG(KEY_ENTER)) {
|
||||
@@ -435,7 +435,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
||||
break;
|
||||
}
|
||||
}
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
if (sub==k && menuHorizontalPosition<0 && CFN_SWITCH(cfn)) {
|
||||
lcdInvertLine(i+1);
|
||||
}
|
||||
@@ -445,7 +445,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
||||
|
||||
void menuModelSpecialFunctions(event_t event)
|
||||
{
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
const CustomFunctionData * cfn = &g_model.customFn[menuVerticalPosition];
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
menuHorizontalPosition = 0;
|
||||
@@ -455,7 +455,7 @@ void menuModelSpecialFunctions(event_t event)
|
||||
|
||||
menuSpecialFunctions(event, g_model.customFn, &modelFunctionsContext);
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition == 0 && s_editMode <= 0) {
|
||||
menuHorizontalPosition = -1;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ void menuRadioDiagKeys(event_t event)
|
||||
}
|
||||
|
||||
if (i < TRM_BASE) {
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
y = MENU_HEADER_HEIGHT + FH + FH*i;
|
||||
if (i >= 2) {
|
||||
// hide PLUS and MINUS virtual buttons
|
||||
@@ -86,7 +86,7 @@ void menuRadioDiagKeys(event_t event)
|
||||
}
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
coord_t y = MENU_HEADER_HEIGHT + FH;
|
||||
coord_t x = 6*FW+3;
|
||||
lcdDrawTextAtIndex(0, MENU_HEADER_HEIGHT + FH , STR_VRENCODERS, 0, 0);
|
||||
|
||||
@@ -96,7 +96,7 @@ enum MenuRadioHardwareItems {
|
||||
ITEM_RADIO_HARDWARE_STICK4,
|
||||
ITEM_RADIO_HARDWARE_LABEL_POTS,
|
||||
ITEM_RADIO_HARDWARE_POT1,
|
||||
#if !defined(PCBX3)
|
||||
#if !defined(PCBX9LITE)
|
||||
ITEM_RADIO_HARDWARE_POT2,
|
||||
#endif
|
||||
ITEM_RADIO_HARDWARE_LABEL_SWITCHES,
|
||||
@@ -136,7 +136,7 @@ enum MenuRadioHardwareItems {
|
||||
ITEM_RADIO_HARDWARE_MAX
|
||||
};
|
||||
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define POTS_ROWS NAVIGATION_LINE_BY_LINE|1
|
||||
#else
|
||||
#define POTS_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
@@ -150,7 +150,7 @@ enum MenuRadioHardwareItems {
|
||||
#define SWITCHES_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#endif
|
||||
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define BLUETOOTH_ROWS
|
||||
#elif defined(PCBTARANIS)
|
||||
#define BLUETOOTH_ROWS uint8_t(IS_BLUETOOTH_CHIP_PRESENT() ? 0 : HIDDEN_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_TELEMETRY ? -1 : HIDDEN_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : 0),
|
||||
@@ -160,7 +160,7 @@ enum MenuRadioHardwareItems {
|
||||
#define BLUETOOTH_ROWS
|
||||
#endif
|
||||
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define SWITCH_TYPE_MAX(sw) (sw == MIXSRC_SD-MIXSRC_FIRST_SWITCH ? SWITCH_2POS : SWITCH_3POS)
|
||||
#elif defined(PCBXLITES)
|
||||
#define SWITCH_TYPE_MAX(sw) (sw >= MIXSRC_SE-MIXSRC_FIRST_SWITCH ? SWITCH_2POS : SWITCH_3POS)
|
||||
@@ -178,7 +178,7 @@ enum MenuRadioHardwareItems {
|
||||
|
||||
#if defined(TX_CAPACITY_MEASUREMENT)
|
||||
#define TX_CAPACITY_MEASUREMENT_ROWS 0,
|
||||
#else
|
||||
#else
|
||||
#define TX_CAPACITY_MEASUREMENT_ROWS
|
||||
#endif
|
||||
|
||||
@@ -259,7 +259,7 @@ void menuRadioHardware(event_t event)
|
||||
break;
|
||||
|
||||
case ITEM_RADIO_HARDWARE_POT1:
|
||||
#if !defined(PCBX3)
|
||||
#if !defined(PCBX9LITE)
|
||||
case ITEM_RADIO_HARDWARE_POT2:
|
||||
#endif
|
||||
{
|
||||
@@ -414,7 +414,7 @@ void menuRadioHardware(event_t event)
|
||||
break;
|
||||
|
||||
case ITEM_RADIO_HARDWARE_RAS:
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
lcdDrawTextAlignedLeft(y, "Ext. RAS");
|
||||
lcdNextPos = HW_SETTINGS_COLUMN2;
|
||||
#else
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "opentx.h"
|
||||
|
||||
// TODO duplicated code
|
||||
#if defined(PCBX7) || defined(PCBX9E) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9E) || defined(PCBX9LITE)
|
||||
#define EVT_KEY_NEXT_LINE EVT_ROTARY_RIGHT
|
||||
#define EVT_KEY_PREVIOUS_LINE EVT_ROTARY_LEFT
|
||||
#else
|
||||
|
||||
@@ -227,7 +227,7 @@ void displayVoltageOrAlarm()
|
||||
#define displayVoltageOrAlarm() displayBattVoltage()
|
||||
#endif
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define EVT_KEY_CONTEXT_MENU EVT_KEY_LONG(KEY_ENTER)
|
||||
#define EVT_KEY_NEXT_VIEW EVT_KEY_BREAK(KEY_PAGE)
|
||||
#define EVT_KEY_NEXT_PAGE EVT_ROTARY_RIGHT
|
||||
@@ -482,7 +482,7 @@ void menuMainView(event_t event)
|
||||
doMainScreenGraphics();
|
||||
|
||||
// Switches
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
static const uint8_t x[NUM_SWITCHES] = {2*FW-2, 2*FW-2, 16*FW+1, 2*FW-2, 16*FW+1};
|
||||
static const uint8_t y[NUM_SWITCHES] = {4*FH+1, 5*FH+1, 5*FH+1, 6*FH+1, 6*FH+1};
|
||||
for (int i=0; i<NUM_SWITCHES; ++i) {
|
||||
|
||||
@@ -712,7 +712,7 @@ bool isTrainerModeAvailable(int mode)
|
||||
else
|
||||
return true;
|
||||
}
|
||||
#elif defined(PCBX7) || defined(PCBXLITES) || defined(PCBX3)
|
||||
#elif defined(PCBX7) || defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
bool isTrainerModeAvailable(int mode)
|
||||
{
|
||||
if (IS_EXTERNAL_MODULE_ENABLED() && (mode == TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE || mode == TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE))
|
||||
|
||||
Reference in New Issue
Block a user