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

Adds sticky buttons functionality to joy_node. #68

Closed
wants to merge 1 commit into from

Conversation

psimona
Copy link
Contributor

@psimona psimona commented Jun 19, 2014

Buttons change state only when a pressed event is detected. For example button A has not been pressed so it has state 0. Now the button A is pressed assuming state 1. On release of the button the sticky buttons implementation leaves the state of the button at 1. To Change state back to 0 another button press event for button A has to be registered.

This functionality can be useful when steering a state machine (or other event driven object) over the network via the joystick, as the press of a joystick button causes a step in the button signal and not an impulse of indederminate length which could be more diffucult to parse into an event.

Buttons change state only when a pressed event is detected. For example button A has not been pressed so it has state 0. Now the button A is pressed assuming state 1. On release of the button the sticky buttons implementation leaves the state of the button at 1. To Change state back to 0 another button press event for button A has to be registered.

This functionality can be useful when steering a state machine (or other event driven object) over the network via the joystick, as the press of a joystick button causes a step in the button signal and not an impulse of indederminate length which could be more diffucult to parse into an event.
@mikepurvis
Copy link
Member

We've typically implemented this functionality at a higher-level teleop node, but I'm not opposed to it going into joy_node. Some other feedback:

  • Embed a comment in the source (maybe above the param line) explaining the functionality.
  • Is is necessary to debounce this? Is there a minimum on-time or off-time?
  • Please use spaces instead of tabs.

@jbohren would have to decide about merging; probably no point addressing this stuff without his blessing.

@jbohren
Copy link
Member

jbohren commented Jul 3, 2017

Fixed by #107, using sticky_buttons parameter.

@jbohren jbohren closed this Jul 3, 2017
@romainreignier
Copy link

This feature seems nice but the Wiki page was not modified to reflect that change.

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.

4 participants