Use constant

This commit is contained in:
3djc
2019-02-09 11:37:47 +01:00
parent 62c7a1978e
commit 5aae25284b
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -1064,9 +1064,9 @@ void menuModelSetup(event_t event)
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, "CH", attr);
lcdDrawNumber(lcdLastRightPos, y, g_model.moduleData[moduleIdx].channelsStart+1, attr);
lcdDrawText(lcdLastRightPos, y, "-");
lcdDrawNumber(lcdLastRightPos, y, g_model.moduleData[moduleIdx].channelsStart+16, 0);
lcdDrawNumber(lcdLastRightPos, y, g_model.moduleData[moduleIdx].channelsStart+PXX2_MODULE_CHANNELS, 0);
if (attr) {
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.moduleData[moduleIdx].channelsStart, 16); //TODO this needs discussion
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.moduleData[moduleIdx].channelsStart, PXX2_MODULE_CHANNELS); //TODO this needs discussion
}
}
break;
+1
View File
@@ -193,6 +193,7 @@ static const int8_t maxChannelsXJT[] = { 0, 8, 0, 4 }; // relative to 8!
constexpr int8_t MAX_TRAINER_CHANNELS_M8 = MAX_TRAINER_CHANNELS - 8;
constexpr int8_t MAX_EXTRA_MODULE_CHANNELS_M8 = 8; // only 16ch PPM
constexpr int8_t PXX2_MODULE_CHANNELS=16;
inline int8_t maxModuleChannels_M8(uint8_t idx)
{