Skip to content

Commit 7cf95ef

Browse files
committed
make the "REPLAY" menu option disabled at startup. It will be clickable after learning
1 parent 272965c commit 7cf95ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/tutorials/projects/p03-learning-mode/01_Braccio_learning_mode/01_Braccio_learning_mode.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ static void eventHandlerMenu(lv_event_t * e) {
5050
Braccio.disengage();
5151
lv_btnmatrix_set_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_CHECKED);
5252
Serial.println("LEARN");
53+
lv_btnmatrix_clear_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_DISABLED); // remove disabled state of the replay button
5354
break;
5455
case 1:
5556
state = REPEAT;
@@ -89,7 +90,7 @@ void mainMenu() {
8990
lv_obj_add_style(btnm, &style_focus, LV_PART_ITEMS | LV_STATE_FOCUS_KEY);
9091

9192
lv_btnmatrix_set_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_CHECKABLE);
92-
lv_btnmatrix_set_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_CHECKABLE);
93+
lv_btnmatrix_set_btn_ctrl(btnm, 1, LV_BTNMATRIX_CTRL_DISABLED);
9394
lv_btnmatrix_set_btn_ctrl(btnm, 2, LV_BTNMATRIX_CTRL_CHECKABLE);
9495

9596
lv_btnmatrix_set_one_checked(btnm, true);

0 commit comments

Comments
 (0)