mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-11-10 15:56:09 -05:00
Add endSelector util
This commit is contained in:
parent
5c04e23504
commit
cc763a0dce
@ -118,11 +118,15 @@ MenuReturn_e runMainMenu(const ButtonPress_e tuner_button,
|
||||
{
|
||||
if(mainMenuSelecting){
|
||||
uint8_t menu_index = mainMenuSelectedItemRaw/MENU_KNOB_COUNTS_PER_ITEM;
|
||||
Button button;
|
||||
memcpy_P(&button,&mainMenuButtons[menu_index],sizeof(button));
|
||||
endSelector(&button);
|
||||
|
||||
//TODO: activate button
|
||||
Serial.print(F("Select button "));
|
||||
Serial.print(menu_index);
|
||||
Serial.print(F(":"));
|
||||
Serial.println(mainMenuButtons[menu_index].text);
|
||||
Serial.println(button.text);
|
||||
}
|
||||
else{
|
||||
initSelector(&mainMenuSelectedItemRaw,
|
||||
|
@ -119,3 +119,8 @@ void adjustSelector(int16_t *const raw_select_val_in_out,
|
||||
playButtonMorse(&new_button,play_type);
|
||||
}
|
||||
}
|
||||
|
||||
void endSelector(const Button *const button)
|
||||
{
|
||||
movePuck(button,nullptr);
|
||||
}
|
||||
|
@ -31,3 +31,5 @@ void adjustSelector(int16_t *const raw_select_val_in_out,
|
||||
const Button *const buttons,
|
||||
const uint8_t num_buttons,
|
||||
const MorsePlaybackType_e);
|
||||
|
||||
void endSelector(const Button *const button);
|
||||
|
Loading…
Reference in New Issue
Block a user