mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2025-02-21 06:57:27 -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){
|
if(mainMenuSelecting){
|
||||||
uint8_t menu_index = mainMenuSelectedItemRaw/MENU_KNOB_COUNTS_PER_ITEM;
|
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
|
//TODO: activate button
|
||||||
Serial.print(F("Select button "));
|
Serial.print(F("Select button "));
|
||||||
Serial.print(menu_index);
|
Serial.print(menu_index);
|
||||||
Serial.print(F(":"));
|
Serial.print(F(":"));
|
||||||
Serial.println(mainMenuButtons[menu_index].text);
|
Serial.println(button.text);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
initSelector(&mainMenuSelectedItemRaw,
|
initSelector(&mainMenuSelectedItemRaw,
|
||||||
|
@ -119,3 +119,8 @@ void adjustSelector(int16_t *const raw_select_val_in_out,
|
|||||||
playButtonMorse(&new_button,play_type);
|
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 Button *const buttons,
|
||||||
const uint8_t num_buttons,
|
const uint8_t num_buttons,
|
||||||
const MorsePlaybackType_e);
|
const MorsePlaybackType_e);
|
||||||
|
|
||||||
|
void endSelector(const Button *const button);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user