Change default at model creation from XJT-D16 8CH to XJT-D16 16CH on … (#3913)

* Change default at model creation from XJT-D16 8CH to XJT-D16 16CH on Taranis and Horus

* Set defaultto 16CH also on protocol change

* External module on Taranis

* MACRO's are good for you

* They are so good they should be used everywhere !

* And everywhere also includes the 9X UIs!
This commit is contained in:
3djc
2016-10-16 09:22:36 +02:00
committed by Bertrand Songis
parent 504bb7a98c
commit 26d2de18c2
5 changed files with 14 additions and 18 deletions
+5 -5
View File
@@ -669,14 +669,14 @@ void menuModelSetup(event_t event)
if (checkIncDec_Ret) {
g_model.moduleData[INTERNAL_MODULE].rfProtocol = 0;
g_model.moduleData[INTERNAL_MODULE].channelsStart = 0;
g_model.moduleData[INTERNAL_MODULE].channelsCount = 0;
g_model.moduleData[INTERNAL_MODULE].channelsCount = DEFAULT_CHANNELS(INTERNAL_MODULE);;
}
break;
case 1:
g_model.moduleData[INTERNAL_MODULE].rfProtocol = checkIncDec(event, g_model.moduleData[INTERNAL_MODULE].rfProtocol, RF_PROTO_X16, RF_PROTO_LAST, EE_MODEL, isRfProtocolAvailable);
if (checkIncDec_Ret) {
g_model.moduleData[INTERNAL_MODULE].channelsStart = 0;
g_model.moduleData[INTERNAL_MODULE].channelsCount = 0;
g_model.moduleData[INTERNAL_MODULE].channelsCount = DEFAULT_CHANNELS(INTERNAL_MODULE);
}
}
}
@@ -690,7 +690,7 @@ void menuModelSetup(event_t event)
if (checkIncDec_Ret) {
g_model.moduleData[0].type = MODULE_TYPE_XJT;
g_model.moduleData[0].channelsStart = 0;
g_model.moduleData[0].channelsCount = 0;
g_model.moduleData[0].channelsCount = DEFAULT_CHANNELS(INTERNAL_MODULE);
}
}
break;
@@ -766,7 +766,7 @@ void menuModelSetup(event_t event)
if (checkIncDec_Ret) {
g_model.moduleData[EXTERNAL_MODULE].rfProtocol = 0;
g_model.moduleData[EXTERNAL_MODULE].channelsStart = 0;
g_model.moduleData[EXTERNAL_MODULE].channelsCount = min<int8_t>(0, MAX_EXTERNAL_MODULE_CHANNELS());
g_model.moduleData[EXTERNAL_MODULE].channelsCount = DEFAULT_CHANNELS(EXTERNAL_MODULE);
}
break;
case 1:
@@ -795,7 +795,7 @@ void menuModelSetup(event_t event)
}
if (checkIncDec_Ret) {
g_model.moduleData[EXTERNAL_MODULE].channelsStart = 0;
g_model.moduleData[EXTERNAL_MODULE].channelsCount = 0;
g_model.moduleData[EXTERNAL_MODULE].channelsCount = DEFAULT_CHANNELS(EXTERNAL_MODULE);
}
break;
#if defined(MULTIMODULE)