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

Function to check controller turned off #4

Open
J2Kbr opened this issue Nov 28, 2016 · 0 comments
Open

Function to check controller turned off #4

J2Kbr opened this issue Nov 28, 2016 · 0 comments

Comments

@J2Kbr
Copy link
Owner

J2Kbr commented Nov 28, 2016

While working on a script, I needed to turn off the controller via holding the DS4 PS button, this was a problem because even with the controller off it will still register the button as being held and end up conflicting with other button pushes done via combos. I tried using the turn_off function but the issue still persisted, I thought about using get_battery to determine if the controller was turned off and using set_val(PS4_PS, 0) in the main loop but realized that get_battery will return 10 by default instead of returning 0 for off, I ended up using get_ptime and set_val as a final solution but it got me thinking about some possible new functions:

  • A function to check if a controller is turned off or perhaps make get_battery return 0 for off and 10 for fully charged.

  • A function that can be called once to reset a button state for when the controller is turned off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant