mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-11-10 15:15:55 -05:00
Get LSB and USB buttons to update properly
This commit is contained in:
parent
8af59b0a85
commit
f66a173dbe
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user