Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow reading joystick buttons executables without including all #791

Merged
merged 1 commit into from
May 17, 2022

Conversation

DatSpace
Copy link
Contributor

This PR makes it less confusing to add new actions for buttons on the joystick. The problem was that the do_while used to break if it couldn't find a specific button in order.

For example if you specified:

button0 ...
button1 ...
button3 ...

It would only add to the list the buttons 0 and 1 and then break, never including button3. The new logic uses a for loop (we have specified number of buttons) and loops through all of the indexes and tries to add them. This allows for the behavior above to work correctly without changing the existing behavior.

Copy link
Member

@pattacini pattacini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pattacini pattacini merged commit fc21ba7 into robotology:devel May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants