Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove Control Reset on Send #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dmadison
Copy link

This removes the control data reset that happens whenever the data is sent. The library now follows a more conventional "press/release" idiom, meaning that if you set a control surface it stays set up until you change it. E.g. if you set a joystick position it won't go back to 0 until you set it back to 0. This avoids having to write every possible control surface for every update, even if they don't change.

Because the array isn't cleared on every update, I also changed the "DPAD_UP" bit to "0" in the default array values. This way the controller won't hold the directional pad up if you don't overwrite the values.

Control inputs set will stay set until they are explicitly changed. I.e. you don't need to continually set the joystick at a certain value, it will just stay there until changed.
Since the array is no longer set to 0 after each send, this bit wasn't overwritten unless the dpad function was explicitly called.
@gdsports
Copy link

gdsports commented Nov 1, 2018

@dmadison @zlittell I merged PR #28, #30, #31 to my fork. The simple and flghtstick examples compile without problems using Arduino IDE 1.8.7 and Teensyduino 1.4.4. Looks very good.

@dmadison
Copy link
Author

dmadison commented Nov 1, 2018

Glad to hear everything is working for you as well! It doesn't look like this repo is being maintained, so I'm going to continue development as needed on my fork.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants