Skip to content

Commit

Permalink
Reorder macro menu functions
Browse files Browse the repository at this point in the history
Swapped brightness and tone increase and decrease to be more intuitive.
  • Loading branch information
n1zzo committed Sep 27, 2022
1 parent 28408fb commit 25d6c20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions openrtx/src/ui/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions openrtx/src/ui/ui_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 25d6c20

Please sign in to comment.