Get LSB and USB buttons to update properly

This commit is contained in:
Reed Nightingale 2020-04-25 12:10:25 -07:00
parent 8af59b0a85
commit f66a173dbe
3 changed files with 8 additions and 0 deletions

View File

@ -59,11 +59,13 @@ void mainMenuTune(int16_t knob)
//Transition from below to above the traditional threshold for USB
if(current_freq < THRESHOLD_USB_LSB && new_freq >= THRESHOLD_USB_LSB){
SetActiveVfoMode(VfoMode_e::VFO_MODE_USB);
updateSidebandButtons();
}
//Transition from above to below the traditional threshold for USB
if(current_freq >= THRESHOLD_USB_LSB && new_freq < THRESHOLD_USB_LSB){
SetActiveVfoMode(VfoMode_e::VFO_MODE_LSB);
updateSidebandButtons();
}
setFrequency(new_freq);

View File

@ -451,6 +451,11 @@ void osSidebandMode(VfoMode_e mode){
drawButton(&button);
}
void updateSidebandButtons()
{
osSidebandMode(GetActiveVfoMode());
}
ButtonStatus_e bsUsb(){
return (VfoMode_e::VFO_MODE_USB == GetActiveVfoMode()) ? ButtonStatus_e::Active : ButtonStatus_e::Inactive;
}

View File

@ -10,3 +10,4 @@ extern const uint8_t MAIN_MENU_NUM_BUTTONS;
extern const Button bVfoA;
extern const Button bVfoB;
void updateBandButtons(const uint32_t old_freq);
void updateSidebandButtons();