mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2025-02-21 06:57:27 -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
|
//Transition from below to above the traditional threshold for USB
|
||||||
if(current_freq < THRESHOLD_USB_LSB && new_freq >= THRESHOLD_USB_LSB){
|
if(current_freq < THRESHOLD_USB_LSB && new_freq >= THRESHOLD_USB_LSB){
|
||||||
SetActiveVfoMode(VfoMode_e::VFO_MODE_USB);
|
SetActiveVfoMode(VfoMode_e::VFO_MODE_USB);
|
||||||
|
updateSidebandButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Transition from above to below the traditional threshold for USB
|
//Transition from above to below the traditional threshold for USB
|
||||||
if(current_freq >= THRESHOLD_USB_LSB && new_freq < THRESHOLD_USB_LSB){
|
if(current_freq >= THRESHOLD_USB_LSB && new_freq < THRESHOLD_USB_LSB){
|
||||||
SetActiveVfoMode(VfoMode_e::VFO_MODE_LSB);
|
SetActiveVfoMode(VfoMode_e::VFO_MODE_LSB);
|
||||||
|
updateSidebandButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
setFrequency(new_freq);
|
setFrequency(new_freq);
|
||||||
|
@ -451,6 +451,11 @@ void osSidebandMode(VfoMode_e mode){
|
|||||||
drawButton(&button);
|
drawButton(&button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void updateSidebandButtons()
|
||||||
|
{
|
||||||
|
osSidebandMode(GetActiveVfoMode());
|
||||||
|
}
|
||||||
|
|
||||||
ButtonStatus_e bsUsb(){
|
ButtonStatus_e bsUsb(){
|
||||||
return (VfoMode_e::VFO_MODE_USB == GetActiveVfoMode()) ? ButtonStatus_e::Active : ButtonStatus_e::Inactive;
|
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 bVfoA;
|
||||||
extern const Button bVfoB;
|
extern const Button bVfoB;
|
||||||
void updateBandButtons(const uint32_t old_freq);
|
void updateBandButtons(const uint32_t old_freq);
|
||||||
|
void updateSidebandButtons();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user