mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 14:25:11 +03:00
More changes, most of them cosmetic
This commit is contained in:
parent
81835d476d
commit
a2c7e788c5
1 changed files with 28 additions and 31 deletions
|
@ -591,39 +591,36 @@ void menuModelSetup(uint8_t event)
|
|||
|
||||
case ITEM_MODEL_INTERNAL_MODULE_LABEL:
|
||||
lcd_putsLeft(y, TR_INTERNALRF);
|
||||
break;
|
||||
break;
|
||||
#if defined(TARANIS_INTERNAL_PPM)
|
||||
case ITEM_MODEL_INTERNAL_MODULE_MODE:
|
||||
lcd_putsLeft(y, STR_MODE);
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_TARANIS_PROTOCOLS, g_model.internalModule, m_posHorz==0 ? attr : 0);
|
||||
if (IS_MODULE_XJT(INTERNAL_MODULE))
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN+5*FW, y, STR_XJT_PROTOCOLS, 1+g_model.moduleData[INTERNAL_MODULE].rfProtocol, m_posHorz==1 ? attr : 0);
|
||||
if (attr && s_editMode>0) {
|
||||
switch (m_posHorz) {
|
||||
case 0:
|
||||
g_model.internalModule = checkIncDec(event, g_model.internalModule, MODULE_TYPE_NONE, MODULE_TYPE_COUNT-2, EE_MODEL, isModuleAvailable);
|
||||
if (checkIncDec_Ret) {
|
||||
g_model.moduleData[INTERNAL_MODULE].rfProtocol = 0;
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsStart = 0;
|
||||
if (g_model.internalModule == MODULE_TYPE_PPM)
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsCount = 0;
|
||||
else
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsCount = MAX_INTERNAL_MODULE_CHANNELS();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[INTERNAL_MODULE].rfProtocol, RF_PROTO_X16, RF_PROTO_LAST);
|
||||
if (checkIncDec_Ret) {
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsStart = 0;
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsCount = MAX_INTERNAL_MODULE_CHANNELS();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ITEM_MODEL_INTERNAL_MODULE_MODE:
|
||||
lcd_putsLeft(y, STR_MODE);
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_TARANIS_PROTOCOLS, g_model.internalModule, m_posHorz==0 ? attr : 0);
|
||||
if (IS_MODULE_XJT(INTERNAL_MODULE))
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN+5*FW, y, STR_XJT_PROTOCOLS, 1+g_model.moduleData[INTERNAL_MODULE].rfProtocol, m_posHorz==1 ? attr : 0);
|
||||
if (attr && s_editMode>0) {
|
||||
switch (m_posHorz) {
|
||||
case 0:
|
||||
g_model.internalModule = checkIncDec(event, g_model.internalModule, MODULE_TYPE_NONE, MODULE_TYPE_COUNT-2, EE_MODEL, isModuleAvailable);
|
||||
if (checkIncDec_Ret) {
|
||||
g_model.moduleData[INTERNAL_MODULE].rfProtocol = 0;
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsStart = 0;
|
||||
if (g_model.internalModule == MODULE_TYPE_PPM)
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsCount = 0;
|
||||
else
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsCount = MAX_INTERNAL_MODULE_CHANNELS();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[INTERNAL_MODULE].rfProtocol, RF_PROTO_X16, RF_PROTO_LAST);
|
||||
if (checkIncDec_Ret) {
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsStart = 0;
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsCount = MAX_INTERNAL_MODULE_CHANNELS();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
#else
|
||||
|
||||
|
||||
case ITEM_MODEL_INTERNAL_MODULE_MODE:
|
||||
lcd_putsLeft(y, STR_MODE);
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_XJT_PROTOCOLS, 1+g_model.moduleData[0].rfProtocol, attr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue