Skip to content

Commit

Permalink
[WIP] Fix issue #1
Browse files Browse the repository at this point in the history
VO/SQ indicators
Scan resume menu
Missing 12.5k step
  • Loading branch information
reppad committed Nov 16, 2023
1 parent 6ec0f84 commit 4e851e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions app/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ void MENU_AcceptSetting(void)
break;

case MENU_SCAN_RESUME:
gExtendedSettings.ScanResume = (gSettingCurrentValue + gSettingIndex) % gSettingMaxValues;
gExtendedSettings.ScanResume = ((gSettingCurrentValue + gSettingIndex) % gSettingMaxValues) + 1;
SETTINGS_SaveGlobals();
break;

Expand Down Expand Up @@ -825,8 +825,9 @@ void MENU_DrawSetting(void)
break;

case MENU_SCAN_RESUME:
gSettingCurrentValue = gExtendedSettings.ScanResume;
gSettingCurrentValue = gExtendedSettings.ScanResume - 1;
gSettingMaxValues = 3;
DISPLAY_Fill(0, 159, 1, 55, COLOR_BACKGROUND);
UI_DrawSettingScanResume(gSettingCurrentValue);
break;

Expand Down Expand Up @@ -1100,7 +1101,7 @@ void MENU_SettingKeyHandler(uint8_t Key)
if (gMenuIndex == MENU_PERSONAL_ID || gMenuIndex == MENU_CH_NAME || gMenuIndex == MENU_CTCSS_DCS || gMenuIndex == MENU_RX_CTCSS_DCS || gMenuIndex == MENU_TX_CTCSS_DCS) {
MENU_Redraw(true);
} else {
MENU_Redraw(false);
MENU_Redraw(true);
}
if (Key == KEY_MENU) {
BEEP_Play(740, 3, 80);
Expand Down
4 changes: 2 additions & 2 deletions ui/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,12 @@ void UI_DrawExtra(uint8_t Mode, uint8_t gModulationType, uint8_t Vfo)

case 1: // TX mode
gColorForeground = COLOR_RED;
UI_DrawSmallString(4, Y, "VO", 2);
UI_DrawSmallString(2, Y, " VO", 3);
break;

case 2: // RX mode
gColorForeground = COLOR_BLUE;
UI_DrawSmallString(4, Y, "SQ", 2);
UI_DrawSmallString(2, Y, " SQ", 3);
break;
}
}
Expand Down
7 changes: 4 additions & 3 deletions ui/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,14 @@ void UI_DrawTxPriority(void)

void UI_DrawFrequencyStep(uint8_t Index)
{
static const char Mode[14][5] = {
static const char Mode[15][5] = {
"0.25K",
"1.25K",
"2.5K ",
"5K ",
"6.25K",
"10K ",
"12.5K",
"20K ",
"25K ",
"50K ",
Expand Down Expand Up @@ -459,6 +460,6 @@ void UI_DrawSettingScanResume(uint8_t Index)
"No Resume ", // 3
};
// Values start at 1 instead of 0 for this setting
UI_DrawSettingOption(Mode[Index - 1], 0);
UI_DrawSettingOption(Mode[(Index) % 3], 1);
UI_DrawSettingOption(Mode[Index], 0);
UI_DrawSettingOption(Mode[(Index + 1) % 3], 1);
}

0 comments on commit 4e851e3

Please sign in to comment.