From 25d6c20ef00cc546decf0565de66a01763c8226e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Izzo?= Date: Tue, 27 Sep 2022 22:28:57 +0200 Subject: [PATCH] Reorder macro menu functions Swapped brightness and tone increase and decrease to be more intuitive. --- openrtx/src/ui/ui.c | 9 +++++---- openrtx/src/ui/ui_menu.c | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/openrtx/src/ui/ui.c b/openrtx/src/ui/ui.c index 9bf281e77..bef0f4c09 100644 --- a/openrtx/src/ui/ui.c +++ b/openrtx/src/ui/ui.c @@ -749,7 +749,7 @@ void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx) case 1: if(state.channel.mode == OPMODE_FM) { - state.channel.fm.txTone++; + state.channel.fm.txTone--; state.channel.fm.txTone %= MAX_TONE_INDEX; state.channel.fm.rxTone = state.channel.fm.txTone; *sync_rtx = true; @@ -758,7 +758,7 @@ void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx) case 2: if(state.channel.mode == OPMODE_FM) { - state.channel.fm.txTone--; + state.channel.fm.txTone++; state.channel.fm.txTone %= MAX_TONE_INDEX; state.channel.fm.rxTone = state.channel.fm.txTone; *sync_rtx = true; @@ -791,6 +791,7 @@ void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx) else if(state.channel.mode == OPMODE_M17) state.channel.mode = OPMODE_FM; *sync_rtx = true; + break; case 6: if (state.channel.power == 100) state.channel.power = 135; @@ -800,10 +801,10 @@ void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx) break; break; case 7: - _ui_changeBrightness(+5); + _ui_changeBrightness(-5); break; case 8: - _ui_changeBrightness(-5); + _ui_changeBrightness(+5); break; } diff --git a/openrtx/src/ui/ui_menu.c b/openrtx/src/ui/ui_menu.c index bfe909672..c6716cc01 100644 --- a/openrtx/src/ui/ui_menu.c +++ b/openrtx/src/ui/ui_menu.c @@ -673,14 +673,14 @@ bool _ui_drawMacroMenu() gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_LEFT, yellow_fab413, "1"); gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_LEFT, - color_white, " T+"); + color_white, " T-"); gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_LEFT, color_white, " %7.1f", ctcss_tone[last_state.channel.fm.txTone]/10.0f); gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_CENTER, yellow_fab413, "2"); gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_CENTER, - color_white, " T-"); + color_white, " T+"); } else if (last_state.channel.mode == OPMODE_M17) { @@ -770,14 +770,14 @@ bool _ui_drawMacroMenu() gfx_print(layout.line3_pos, layout.top_font, TEXT_ALIGN_LEFT, yellow_fab413, "7"); gfx_print(layout.line3_pos, layout.top_font, TEXT_ALIGN_LEFT, - color_white, " B+"); + color_white, " B-"); gfx_print(layout.line3_pos, layout.top_font, TEXT_ALIGN_LEFT, color_white, " %5d", state.settings.brightness); gfx_print(layout.line3_pos, layout.top_font, TEXT_ALIGN_CENTER, yellow_fab413, "8"); gfx_print(layout.line3_pos, layout.top_font, TEXT_ALIGN_CENTER, - color_white, " B-"); + color_white, " B+"); gfx_print(layout.line3_pos, layout.top_font, TEXT_ALIGN_RIGHT, yellow_fab413, "9 "); gfx_print(layout.line3_pos, layout.top_font, TEXT_ALIGN_RIGHT,