mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 22:35:12 +03:00
Harmonise module default channel count
This commit is contained in:
parent
3d29b8e7e5
commit
8b419770e2
1 changed files with 5 additions and 10 deletions
|
@ -645,17 +645,14 @@ void menuModelSetup(uint8_t event)
|
|||
if (checkIncDec_Ret) {
|
||||
g_model.moduleData[INTERNAL_MODULE].rfProtocol = 0;
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsStart = 0;
|
||||
if (g_model.moduleData[INTERNAL_MODULE].type == 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();
|
||||
g_model.moduleData[INTERNAL_MODULE].channelsCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -696,10 +693,8 @@ void menuModelSetup(uint8_t event)
|
|||
if (checkIncDec_Ret) {
|
||||
g_model.moduleData[EXTERNAL_MODULE].rfProtocol = 0;
|
||||
g_model.moduleData[EXTERNAL_MODULE].channelsStart = 0;
|
||||
if (g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_PPM)
|
||||
g_model.moduleData[EXTERNAL_MODULE].channelsCount = 0;
|
||||
else
|
||||
g_model.moduleData[EXTERNAL_MODULE].channelsCount = MAX_EXTERNAL_MODULE_CHANNELS();
|
||||
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
@ -709,7 +704,7 @@ void menuModelSetup(uint8_t event)
|
|||
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[EXTERNAL_MODULE].rfProtocol, RF_PROTO_X16, RF_PROTO_LAST);
|
||||
if (checkIncDec_Ret) {
|
||||
g_model.moduleData[EXTERNAL_MODULE].channelsStart = 0;
|
||||
g_model.moduleData[EXTERNAL_MODULE].channelsCount = MAX_EXTERNAL_MODULE_CHANNELS();
|
||||
g_model.moduleData[EXTERNAL_MODULE].channelsCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue