mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-11-17 18:55:57 -05:00
Play morse when selecting
This commit is contained in:
parent
66a9d82308
commit
79a37620c2
@ -121,8 +121,8 @@ MenuReturn_e runMainMenu(const ButtonPress_e tuner_button,
|
|||||||
|
|
||||||
else if(ButtonPress_e::NotPressed != touch_button){
|
else if(ButtonPress_e::NotPressed != touch_button){
|
||||||
//We treat long and short presses the same, so no need to have a switch
|
//We treat long and short presses the same, so no need to have a switch
|
||||||
Button b;
|
Button button;
|
||||||
if(findPressedButton(mainMenuButtons,MAIN_MENU_NUM_BUTTONS,&b,touch_point)){
|
if(findPressedButton(mainMenuButtons,MAIN_MENU_NUM_BUTTONS,&button,touch_point)){
|
||||||
//TODO: activate button
|
//TODO: activate button
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -137,6 +137,15 @@ MenuReturn_e runMainMenu(const ButtonPress_e tuner_button,
|
|||||||
const uint8_t new_select = mainMenuSelectedItemRaw/MENU_KNOB_COUNTS_PER_ITEM;
|
const uint8_t new_select = mainMenuSelectedItemRaw/MENU_KNOB_COUNTS_PER_ITEM;
|
||||||
if(prev_select != new_select){
|
if(prev_select != new_select){
|
||||||
movePuck(&mainMenuButtons[prev_select],&mainMenuButtons[new_select]);//TODO
|
movePuck(&mainMenuButtons[prev_select],&mainMenuButtons[new_select]);//TODO
|
||||||
|
morseLetter(mainMenuButtons[new_select].morse);
|
||||||
|
int8_t morse_status = 0;
|
||||||
|
mainMenuButtons[new_select].morse_status(morse_status);
|
||||||
|
if(morse_status < 0){
|
||||||
|
morseBool(false);
|
||||||
|
}
|
||||||
|
else if(morse_status > 0){
|
||||||
|
morseBool(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
Loading…
Reference in New Issue
Block a user