Skip to content

Commit 2cb30d9

Browse files
committed
Same functionality for SELECT as for ENTER.
1 parent 3725c9c commit 2cb30d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

examples/Controlling_Manually_Braccio/Controlling_Manually_Braccio.ino

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ void loop()
248248
}
249249
prev_joystick_pressed_enter = curr_joystick_pressed_enter;
250250

251+
/* SELECT */
252+
253+
static bool prev_joystick_pressed_select = false;
254+
bool const curr_joystick_pressed_select = Braccio.isJoystickPressed_SELECT();
255+
if (!prev_joystick_pressed_select && curr_joystick_pressed_select) {
256+
app.update(Button::Enter);
257+
}
258+
prev_joystick_pressed_select = curr_joystick_pressed_select;
259+
251260
/* DOWN */
252261

253262
static bool prev_joystick_pressed_down = false;

0 commit comments

Comments
 (0)