UI: Replace GPS with MODE selection on macro menu

replace/f20e2c2963cec52dad50d0f89e2e555af66b4530
Federico Amedeo Izzo 2021-01-26 21:19:11 +01:00
rodzic 5311183c8a
commit f61c269270
2 zmienionych plików z 18 dodań i 1 usunięć

Wyświetl plik

@ -514,6 +514,13 @@ void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx) {
state.channel.bandwidth %= 3;
*sync_rtx = true;
break;
case 5:
if(state.channel.mode == FM)
state.channel.mode = DMR;
else if(state.channel.mode == DMR)
state.channel.mode = FM;
*sync_rtx = true;
break;
case 7:
new_blight += 25;
new_blight = (new_blight > 255) ? 255 : new_blight;

Wyświetl plik

@ -275,7 +275,17 @@ bool _ui_drawMenuMacro(state_t* last_state) {
color_white);
gfx_print(layout.line2_left, "5 ", layout.top_font, TEXT_ALIGN_CENTER,
yellow_fab413);
gfx_print(layout.line2_left, " GPS", layout.top_font, TEXT_ALIGN_CENTER,
char mode_str[9] = "";
switch(last_state->channel.mode)
{
case FM:
snprintf(mode_str, 9," FM");
break;
case DMR:
snprintf(mode_str, 9," DMR");
break;
}
gfx_print(layout.line2_left, mode_str, layout.top_font, TEXT_ALIGN_CENTER,
color_white);
gfx_print(layout.line2_right, "6 ", layout.top_font, TEXT_ALIGN_RIGHT,
yellow_fab413);