mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
R9M Lite FCC has only one power mode (#5887)
* R9M Lite FCC has only one power mode * Increase code reliability if new option changes are introduced
This commit is contained in:
parent
0eeb197c81
commit
8366d6ec2a
1 changed files with 10 additions and 2 deletions
|
@ -1312,14 +1312,22 @@ void menuModelSetup(event_t event)
|
|||
if (IS_MODULE_R9M(moduleIdx)) {
|
||||
lcdDrawTextAlignedLeft(y, TR_MULTI_RFPOWER);
|
||||
if(IS_MODULE_R9M_FCC(moduleIdx)) {
|
||||
g_model.moduleData[moduleIdx].pxx.power = min((uint8_t)g_model.moduleData[moduleIdx].pxx.power, (uint8_t)R9M_FCC_POWER_MAX); // Lite FCC has only one setting
|
||||
#if defined(MODULE_R9M_FULLSIZE)
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_R9M_FCC_POWER_VALUES, g_model.moduleData[moduleIdx].pxx.power, LEFT | attr);
|
||||
if (attr)
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[moduleIdx].pxx.power, 0, R9M_FCC_POWER_MAX);
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.moduleData[moduleIdx].pxx.power, R9M_FCC_POWER_MAX);
|
||||
#else
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_R9M_FCC_POWER_VALUES, g_model.moduleData[moduleIdx].pxx.power, LEFT);
|
||||
if (attr)
|
||||
REPEAT_LAST_CURSOR_MOVE();
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
g_model.moduleData[moduleIdx].pxx.power = min((uint8_t)g_model.moduleData[moduleIdx].pxx.power, (uint8_t)R9M_LBT_POWER_MAX);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_R9M_LBT_POWER_VALUES, selectedPxxPower, LEFT | attr);
|
||||
if (attr) {
|
||||
CHECK_INCDEC_MODELVAR(event, selectedPxxPower, 0, R9M_LBT_POWER_MAX);
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, selectedPxxPower, R9M_LBT_POWER_MAX);
|
||||
}
|
||||
if (attr && editMode == 0 && selectedPxxPower != g_model.moduleData[moduleIdx].pxx.power) {
|
||||
if((selectedPxxPower + g_model.moduleData[moduleIdx].pxx.power) < 5) //switching between mode 2 and 3 does not require rebind
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue