From 628e3ed60958cdd0163a67f8c4025a3839063354 Mon Sep 17 00:00:00 2001 From: 3djc Date: Sat, 27 Apr 2019 12:07:11 +0200 Subject: [PATCH] Cleanups --- radio/src/gui/480x272/model_module_options.cpp | 6 +++--- radio/src/gui/480x272/model_receiver_options.cpp | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/radio/src/gui/480x272/model_module_options.cpp b/radio/src/gui/480x272/model_module_options.cpp index 75de269b3..ca1ee9da9 100644 --- a/radio/src/gui/480x272/model_module_options.cpp +++ b/radio/src/gui/480x272/model_module_options.cpp @@ -138,7 +138,7 @@ bool menuModelModuleOptions(event_t event) switch (i) { case ITEM_MODULE_SETTINGS_RF_PROTOCOL: - lcdDrawText(0, y, "RF Protocol"); + lcdDrawText(MENUS_MARGIN_LEFT, y, "RF Protocol"); lcdDrawTextAtIndex(RECEIVER_OPTIONS_2ND_COLUMN, y, STR_XJT_PROTOCOLS, reusableBuffer.hardwareAndSettings.moduleSettings.rfProtocol + 1, attr); if (attr) { reusableBuffer.hardwareAndSettings.moduleSettings.rfProtocol = checkIncDec(event, reusableBuffer.hardwareAndSettings.moduleSettings.rfProtocol, RF_PROTO_X16, RF_PROTO_LAST, 0, nullptr); @@ -149,7 +149,7 @@ bool menuModelModuleOptions(event_t event) break; case ITEM_MODULE_SETTINGS_EXTERNAL_ANTENNA: - lcdDrawText(0, y, "Ext. antenna"); + lcdDrawText(MENUS_MARGIN_LEFT, y, "Ext. antenna"); reusableBuffer.hardwareAndSettings.moduleSettings.externalAntenna = editCheckBox(reusableBuffer.hardwareAndSettings.moduleSettings.externalAntenna, RECEIVER_OPTIONS_2ND_COLUMN, y, attr, event); if (attr && checkIncDec_Ret) { reusableBuffer.hardwareAndSettings.moduleSettingsDirty = true; @@ -157,7 +157,7 @@ bool menuModelModuleOptions(event_t event) break; case ITEM_MODULE_SETTINGS_POWER: - lcdDrawText(0, y, "Power"); + lcdDrawText(MENUS_MARGIN_LEFT, y, "Power"); lcdDrawNumber(RECEIVER_OPTIONS_2ND_COLUMN, y, reusableBuffer.hardwareAndSettings.moduleSettings.txPower, attr); lcdDrawText(lcdNextPos, y, "dBm("); drawPower(lcdNextPos, y, reusableBuffer.hardwareAndSettings.moduleSettings.txPower); diff --git a/radio/src/gui/480x272/model_receiver_options.cpp b/radio/src/gui/480x272/model_receiver_options.cpp index 1344bbcb4..db6a8f37d 100644 --- a/radio/src/gui/480x272/model_receiver_options.cpp +++ b/radio/src/gui/480x272/model_receiver_options.cpp @@ -20,7 +20,7 @@ #include -#define RECEIVER_OPTIONS_2ND_COLUMN 80 +#define RECEIVER_OPTIONS_2ND_COLUMN 200 extern uint8_t g_moduleIdx; @@ -123,7 +123,7 @@ bool menuModelReceiverOptions(event_t event) if (pin < reusableBuffer.hardwareAndSettings.receiverSettings.outputsCount) { uint8_t channel = g_model.moduleData[g_moduleIdx].channelsStart + reusableBuffer.hardwareAndSettings.receiverSettings.outputsMapping[pin]; int32_t channelValue = channelOutputs[channel]; - lcdDrawText(0, y, "Pin"); + lcdDrawText(MENUS_MARGIN_LEFT, y, "Pin"); lcdDrawNumber(lcdNextPos + 1, y, pin + 1); putsChn(80, y, channel + 1, attr); @@ -153,4 +153,5 @@ bool menuModelReceiverOptions(event_t event) else { lcdDrawCenteredText(LCD_H/2, "Waiting for RX..."); } + return true; }