mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-09-29 23:05:59 -04:00
Actually activate buttons!
This commit is contained in:
parent
c176604320
commit
3b932d54b4
@ -123,12 +123,7 @@ MenuReturn_e runMainMenu(const ButtonPress_e tuner_button,
|
|||||||
memcpy_P(&bp,&(mainMenuButtons[menu_index]),sizeof(bp));
|
memcpy_P(&bp,&(mainMenuButtons[menu_index]),sizeof(bp));
|
||||||
memcpy_P(&button,bp,sizeof(button));
|
memcpy_P(&button,bp,sizeof(button));
|
||||||
endSelector(&button);
|
endSelector(&button);
|
||||||
|
button.on_select();
|
||||||
//TODO: activate button
|
|
||||||
Serial.print(F("Select button "));
|
|
||||||
Serial.print(menu_index);
|
|
||||||
Serial.print(F(":"));
|
|
||||||
Serial.println(button.text);
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
initSelector(&mainMenuSelectedItemRaw,
|
initSelector(&mainMenuSelectedItemRaw,
|
||||||
@ -164,13 +159,10 @@ MenuReturn_e runMainMenu(const ButtonPress_e tuner_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 button;
|
Button button;
|
||||||
if(findPressedButton(mainMenuButtons,MAIN_MENU_NUM_BUTTONS,&button,touch_point)){
|
if(findPressedButton(mainMenuButtons,MAIN_MENU_NUM_BUTTONS,&button,touch_point)){
|
||||||
//TODO: activate button
|
button.on_select();
|
||||||
Serial.print(F("Touch button "));
|
|
||||||
Serial.println(button.text);
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//Touch detected, but not on our buttons, so ignore
|
//Touch detected, but not on our buttons, so ignore
|
||||||
Serial.println(F("Touch not on button"));
|
|
||||||
}
|
}
|
||||||
}//touch_button
|
}//touch_button
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user