Module options continued

This commit is contained in:
Bertrand Songis
2019-03-27 09:52:13 +01:00
parent f7563bc421
commit 36c4b528b2
2 changed files with 17 additions and 13 deletions
+17 -1
View File
@@ -44,7 +44,17 @@ enum {
ITEM_MODULE_SETTINGS_COUNT
};
extern uint8_t moduleOptions[];
/* order: RF Protocol, External antenna, Power */
const uint8_t moduleOptions[] = {
0b00000000, // None
0b11111011, // XJT
0b11111011, // IXJT
0b11111011, // IXJT-PRO
0b11111011, // IXJT-S
0b11111100, // R9M
0b11111100, // R9MLite
0b11111100, // R9MLite-PRO
};
#define IF_MODULE_OPTIONS(option, count) uint8_t((moduleOptions[modelId] & (1 << option)) ? count : HIDDEN_ROW)
@@ -97,6 +107,12 @@ void menuModelModuleOptions(event_t event)
popMenu();
}
if (menuVerticalPosition == 0) {
while (mstate_tab[menuVerticalPosition] == HIDDEN_ROW) {
++menuVerticalPosition;
}
}
int8_t sub = menuVerticalPosition;
lcdDrawTextAlignedLeft(0, "Module options");
lcdInvertLine(0);
-12
View File
@@ -61,18 +61,6 @@ static const char * const modulesModels[] = {
"R9MLite-PRO",
};
/* order: RF Protocol, External antenna, Power */
uint8_t moduleOptions[] = {
0b00000010, // None
0b11111011, // XJT
0b11111011, // IXJT
0b11111011, // IXJT-PRO
0b11111011, // IXJT-S
0b11111100, // R9M
0b11111100, // R9MLite
0b11111100, // R9MLite-PRO
};
static const char * const receiversModels[] = {
"---",
"X8R",