XJT2 channel count can only be 8, 16 or 24
This commit is contained in:
@@ -199,8 +199,8 @@ inline bool isModuleDSM2(uint8_t idx)
|
||||
}
|
||||
#endif
|
||||
|
||||
// order is the same as in enum Protocols in myeeprom.h (none, ppm, pxx, dsm, crossfire, multi, r9m, sbus)
|
||||
static const int8_t maxChannelsModules[] = { 0, 8, 8, -2, 8, 4, 8, 8}; // relative to 8!
|
||||
// order is the same as in enum Protocols in myeeprom.h (none, ppm, pxx, pxx2, dsm, crossfire, multi, r9m, r9m2, sbus)
|
||||
static const int8_t maxChannelsModules[] = { 0, 8, 8, 16, -2, 8, 4, 8, 16, 8}; // relative to 8!
|
||||
static const int8_t maxChannelsXJT[] = { 0, 8, 0, 4 }; // relative to 8!
|
||||
|
||||
constexpr int8_t MAX_TRAINER_CHANNELS_M8 = MAX_TRAINER_CHANNELS - 8;
|
||||
@@ -242,7 +242,7 @@ inline int8_t sentModuleChannels(uint8_t idx)
|
||||
{
|
||||
if (isModuleCrossfire(idx))
|
||||
return CROSSFIRE_CHANNELS_COUNT;
|
||||
else if ((isModuleMultimodule(idx) && !isModuleMultimoduleDSM2(idx)) || isModuleXJT2(idx))
|
||||
else if (isModuleMultimodule(idx) && !isModuleMultimoduleDSM2(idx))
|
||||
return 16;
|
||||
else
|
||||
return 8 + g_model.moduleData[idx].channelsCount;
|
||||
|
||||
Reference in New Issue
Block a user