File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
examples/Braccio_Learn_and_Repeat Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 55#define COLOR_LIGHT_TEAL 0x62AEB2
66#define COLOR_ORANGE 0xE47128
77
8+ // ENTER button
9+ #define BUTTON_ENTER 6
10+
811enum states {
912 RECORD,
1013 REPLAY,
@@ -28,12 +31,8 @@ static void eventHandlerMenu(lv_event_t * e) {
2831 lv_event_code_t code = lv_event_get_code (e);
2932 lv_obj_t * obj = lv_event_get_target (e);
3033
31- if (code == LV_EVENT_KEY && lv_indev_get_key (lv_indev_get_act ()) == LV_KEY_HOME) {
32- state = ZERO_POSITION;
33- return ;
34- }
3534
36- if (code == LV_EVENT_CLICKED) {
35+ if (code == LV_EVENT_CLICKED || (code == LV_EVENT_KEY && Braccio. getKey () == BUTTON_ENTER) ) {
3736 uint32_t id = lv_btnmatrix_get_selected_btn (obj);
3837 const char * txt = lv_btnmatrix_get_btn_text (obj, id);
3938
You can’t perform that action at this time.
0 commit comments