Sanitization
This commit is contained in:
@@ -89,7 +89,7 @@ void menuModelModuleOptions(event_t event)
|
||||
|
||||
uint8_t modelId = reusableBuffer.hardwareAndSettings.modules[g_moduleIdx].information.modelID;
|
||||
// uint8_t variant = reusableBuffer.hardwareAndSettings.modules[g_moduleIdx].information.variant;
|
||||
uint8_t optionsAvailable = getModuleOptions(modelId) & ((1 << MODULE_OPTION_EXTERNAL_ANTENNA) | (1 << MODULE_OPTION_POWER));
|
||||
uint8_t optionsAvailable = getPXX2ModuleOptions(modelId) & ((1 << MODULE_OPTION_EXTERNAL_ANTENNA) | (1 << MODULE_OPTION_POWER));
|
||||
|
||||
SUBMENU_NOTITLE(ITEM_MODULE_SETTINGS_COUNT, {
|
||||
!optionsAvailable ? (uint8_t)0 : IF_MODULE_OPTIONS(MODULE_OPTION_EXTERNAL_ANTENNA, 0),
|
||||
@@ -135,7 +135,7 @@ void menuModelModuleOptions(event_t event)
|
||||
|
||||
int8_t sub = menuVerticalPosition;
|
||||
lcdDrawTextAlignedLeft(0, STR_MODULE_OPTIONS);
|
||||
lcdDrawText(lcdLastRightPos + 3, 0, PXX2modulesModels[modelId]);
|
||||
lcdDrawText(lcdLastRightPos + 3, 0, getPXX2ModuleName(modelId));
|
||||
lcdInvertLine(0);
|
||||
|
||||
if (reusableBuffer.hardwareAndSettings.moduleSettings.state == PXX2_SETTINGS_OK) {
|
||||
|
||||
@@ -102,9 +102,9 @@ void onUpdateStateChanged()
|
||||
{
|
||||
if (reusableBuffer.sdManager.otaUpdateInformation.step == BIND_INFO_REQUEST) {
|
||||
uint8_t modelId = reusableBuffer.sdManager.otaUpdateInformation.receiverInformation.modelID;
|
||||
if (modelId > 0 && modelId < DIM(PXX2receiversModels)) {
|
||||
if (modelId > 0 && modelId < DIM(PXX2ReceiversModels)) {
|
||||
if (isReceiverOptionAvailable(modelId, RECEIVER_OPTION_OTA)) {
|
||||
POPUP_CONFIRMATION(PXX2receiversModels[modelId], onUpdateConfirmation);
|
||||
POPUP_CONFIRMATION(getPXX2ReceiverName(modelId), onUpdateConfirmation);
|
||||
char *tmp = strAppend(reusableBuffer.sdManager.otaReceiverVersion, TR_CURRENT_VERSION);
|
||||
tmp = strAppendUnsigned(tmp, 1 + reusableBuffer.sdManager.otaUpdateInformation.receiverInformation.swVersion.major);
|
||||
*tmp++ = '.';
|
||||
|
||||
@@ -123,7 +123,7 @@ void menuRadioModulesVersion(event_t event)
|
||||
}
|
||||
}
|
||||
uint8_t modelId = reusableBuffer.hardwareAndSettings.modules[module].information.modelID;
|
||||
lcdDrawText(COLUMN2_X, y, PXX2modulesModels[modelId]);
|
||||
lcdDrawText(COLUMN2_X, y, getPXX2ModuleName(modelId));
|
||||
}
|
||||
y += FH;
|
||||
|
||||
@@ -147,7 +147,7 @@ void menuRadioModulesVersion(event_t event)
|
||||
lcdDrawText(INDENT_WIDTH, y, STR_RECEIVER);
|
||||
lcdDrawNumber(lcdLastRightPos + 2, y, receiver + 1);
|
||||
uint8_t modelId = reusableBuffer.hardwareAndSettings.modules[module].receivers[receiver].information.modelID;
|
||||
lcdDrawText(COLUMN2_X, y, PXX2receiversModels[modelId]);
|
||||
lcdDrawText(COLUMN2_X, y, getPXX2ReceiverName(modelId));
|
||||
}
|
||||
y += FH;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user