Output type only with 9xrpro and ppm and refactor
This commit is contained in:
@@ -211,8 +211,8 @@ enum MenuModelSetupItems {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBSKY9X) && defined(REVX)
|
#if defined(PCBSKY9X) && defined(REVX)
|
||||||
#define OUTPUT_TYPE_ROW (isModulePPM(EXTERNAL_MODULE) ? (uint8_t)0 : HIDDEN_ROW),
|
#define OUTPUT_TYPE_ROW (isModulePPM(EXTERNAL_MODULE) ? (uint8_t)0 : HIDDEN_ROW), // Output type (OpenDrain / PushPull)
|
||||||
#elif defined(PCBSKY9X)
|
#else
|
||||||
#define OUTPUT_TYPE_ROW
|
#define OUTPUT_TYPE_ROW
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -239,12 +239,6 @@ inline uint8_t MODULE_SUBTYPE_ROWS(int moduleIdx)
|
|||||||
#define TIMER_ROWS(x) 2, 0, 0, 0, g_model.timers[x].countdownBeep != COUNTDOWN_SILENT ? (uint8_t)1 : (uint8_t)0
|
#define TIMER_ROWS(x) 2, 0, 0, 0, g_model.timers[x].countdownBeep != COUNTDOWN_SILENT ? (uint8_t)1 : (uint8_t)0
|
||||||
#define TIMERS_ROWS TIMER_ROWS(0), TIMER_ROWS(1), TIMER_ROWS(2)
|
#define TIMERS_ROWS TIMER_ROWS(0), TIMER_ROWS(1), TIMER_ROWS(2)
|
||||||
|
|
||||||
#if defined(PCBSKY9X) && defined(REVX)
|
|
||||||
#define EXTERNAL_MODULE_OUTPUT_ROW 0, // Output type (OpenDrain / PushPull)
|
|
||||||
#else
|
|
||||||
#define EXTERNAL_MODULE_OUTPUT_ROW
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PCBSKY9X)
|
#if defined(PCBSKY9X)
|
||||||
#define EXTRA_MODULE_ROWS LABEL(ExtraModule), 1, 2,
|
#define EXTRA_MODULE_ROWS LABEL(ExtraModule), 1, 2,
|
||||||
#else
|
#else
|
||||||
@@ -393,12 +387,22 @@ void editTimerCountdown(int timerIdx, coord_t y, LcdFlags attr, event_t event)
|
|||||||
#define EXTERNAL_MODULE_ROWS
|
#define EXTERNAL_MODULE_ROWS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
#define WARN_ROWS \
|
||||||
|
SW_WARN_ROWS, /* Switch warning */ \
|
||||||
|
POT_WARN_ROWS, /* Pot warning */
|
||||||
|
#else
|
||||||
|
#define WARN_ROWS \
|
||||||
|
NUM_SWITCHES - 1, /* Switch warning */
|
||||||
|
#endif
|
||||||
|
|
||||||
void menuModelSetup(event_t event)
|
void menuModelSetup(event_t event)
|
||||||
{
|
{
|
||||||
int8_t old_editMode = s_editMode;
|
int8_t old_editMode = s_editMode;
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
int8_t old_posHorz = menuHorizontalPosition;
|
int8_t old_posHorz = menuHorizontalPosition;
|
||||||
|
#endif
|
||||||
|
|
||||||
MENU_TAB({
|
MENU_TAB({
|
||||||
HEADER_LINE_COLUMNS
|
HEADER_LINE_COLUMNS
|
||||||
@@ -416,8 +420,7 @@ void menuModelSetup(event_t event)
|
|||||||
LABEL(PreflightCheck),
|
LABEL(PreflightCheck),
|
||||||
0, // Checklist
|
0, // Checklist
|
||||||
0, // Throttle warning
|
0, // Throttle warning
|
||||||
SW_WARN_ROWS, // Switch warning
|
WARN_ROWS
|
||||||
POT_WARN_ROWS, // Pot warning
|
|
||||||
|
|
||||||
NUM_STICKS + NUM_POTS + NUM_SLIDERS - 1, // Center beeps
|
NUM_STICKS + NUM_POTS + NUM_SLIDERS - 1, // Center beeps
|
||||||
0, // Global functions
|
0, // Global functions
|
||||||
@@ -428,39 +431,12 @@ void menuModelSetup(event_t event)
|
|||||||
|
|
||||||
EXTERNAL_MODULE_ROWS
|
EXTERNAL_MODULE_ROWS
|
||||||
|
|
||||||
TRAINER_ROWS
|
OUTPUT_TYPE_ROW
|
||||||
});
|
|
||||||
#else
|
|
||||||
MENU_TAB({
|
|
||||||
HEADER_LINE_COLUMNS
|
|
||||||
0,
|
|
||||||
TIMERS_ROWS,
|
|
||||||
0, // Extended limits
|
|
||||||
1, // Extended trims
|
|
||||||
0, // Show trims
|
|
||||||
0, // Trims step
|
|
||||||
0, // Throttle reverse
|
|
||||||
0, // Throttle trace source
|
|
||||||
0, // Throttle trim
|
|
||||||
0, // Throttle trim switch
|
|
||||||
|
|
||||||
LABEL(PreflightCheck),
|
|
||||||
0, // Checklist
|
|
||||||
0, // Throttle warning
|
|
||||||
NUM_SWITCHES-1, // Switch warning
|
|
||||||
|
|
||||||
NUM_STICKS + NUM_POTS + NUM_SLIDERS - 1, // Center beeps
|
|
||||||
0, // Global functions
|
|
||||||
|
|
||||||
EXTERNAL_MODULE_ROWS
|
|
||||||
|
|
||||||
EXTERNAL_MODULE_OUTPUT_ROW
|
|
||||||
|
|
||||||
EXTRA_MODULE_ROWS
|
EXTRA_MODULE_ROWS
|
||||||
|
|
||||||
TRAINER_ROWS
|
TRAINER_ROWS
|
||||||
});
|
});
|
||||||
#endif
|
|
||||||
|
|
||||||
MENU_CHECK(menuTabModel, MENU_MODEL_SETUP, HEADER_LINE + ITEM_MODEL_SETUP_LINES_COUNT);
|
MENU_CHECK(menuTabModel, MENU_MODEL_SETUP, HEADER_LINE + ITEM_MODEL_SETUP_LINES_COUNT);
|
||||||
title(STR_MENUSETUP);
|
title(STR_MENUSETUP);
|
||||||
|
|||||||
Reference in New Issue
Block a user