Commit graph

16 commits

Author SHA1 Message Date
David Madison 2120adf283 Refactor button index function names
It's not really fair to refer to the main index function as "legacy" if it's actively being used. All controller-specific 'get' filtering functions are now appended with the name of the controller rather than having it in the middle.
2021-03-27 08:44:20 -04:00
David Madison 6e0748d097 Revert "Change button index 'get' functions to constexpr"
On second thought, reverting this so that in the case that the function is *not* evaluated at compile-time, the button values function is not called twice.
2021-03-27 08:37:15 -04:00
David Madison 89575639b1 Change button index 'get' functions to constexpr 2021-03-27 08:37:15 -04:00
David Madison 57afaefd2c Check direct enum comparisons by index
To not break support for users who used the "wrong" control enumeration for that controller, but had their program work because the "wrong" enum used the same ID.
2021-03-27 07:31:37 -04:00
David Madison f9a408204d Use signed index values for ButtonEnum 2021-03-27 06:51:01 -04:00
David Madison 26c66f455e Remove shared identifiers in ButtonEnum
Move shared button identifiers from enum to an inline function, so formerly shared identifiers can be separately filtered and processed on a class-by-class basis.

Fixes #611.
2021-03-27 06:51:01 -04:00
sieren 094f64b697 [RBL] Cast sizeof to uint8_t where needed
The RedbearLab compiler has a type mismatch for
STLs min() and sizeof. Thus we need to cast the
occurences of sizeof to uint8_t.
2016-09-27 18:02:08 +02:00
Kristian Sloth Lauszus 267f330ed7 Put DPADEnum into the source file, so it does not conflict with the one in the SRWS1 driver 2016-02-26 01:02:39 +01:00
Kristian Sloth Lauszus a032e01465 Fixed "warning: comparison between signed and unsigned integer expressions"
Also return if length is too short
2015-04-20 00:51:52 +02:00
Andrew J. Kroll 586ed62467 CRLF -> LF 2015-03-12 17:27:21 -04:00
Kristian Lauszus fcd6eb5084 Improved the way PS4 buttons are read 2014-02-17 01:25:29 +01:00
Kristian Lauszus 2b69cfe15e Fixed indentation in PS4Parser.cpp 2014-02-17 00:27:46 +01:00
Kristian Lauszus 6373ebe6ce Can now set the rumble and light on the PS4 controller
Still need to test it via USB
2014-02-17 00:21:21 +01:00
Kristian Lauszus 2a1db31cf1 Can now read the IMU and touchpad values of the PS4 controller via Bluetooth as well
Thanks to Frank Zhao - see: http://eleccelerator.com/wiki/index.php?title=DualShock_4#0x11
2014-01-22 05:13:49 +01:00
Kristian Lauszus e781d6c554 Updated some comments and some other minor things 2014-01-19 16:58:29 +01:00
Kristian Lauszus da2ee95445 Added support for the PS4 controller via USB
Also improved the PS4BT library
2014-01-18 22:36:01 +01:00
Renamed from PS4BT.cpp (Browse further)