Commit Graph

15 Commits

Author SHA1 Message Date
dexterdy
acee5ab5ea Seperated configuration from base class for convenience. Added support for special buttons (#97)
* added support for start and select button

* Added the things I forgot

* changed header

* edited the main file to add support for the different special buttons

* added the press and release functions

* added stuff to make it more complete. not done yet

* this should do it

* added back button

* made the indentation consistent

* small commit so i can continue on my other pc

* finished the header for the config class

* started working on converting existing code with new config class

* replaced all _include variable with calls to the config class

* fixed constructor

* removed setAutoReport function

* fixed a bunch of dumb mistakes

* fixed a bunch of dumb mistakes

* made the indentation consistent

* small commit so i can continue on my other pc

* finished the header for the config class

* started working on converting existing code with new config class

* replaced all _include variable with calls to the config class

* removed setAutoReport function

* fixed a bunch of dumb mistakes

* added report id to list of configurable options

* actually finished all the getters and setters from the config class

* finished the configuration class

* forgot controllertype config

* updated the examples

* added my own example

* added home test to example

* ran an autoformatter

* added a comment (examples)

* more readable copy-by-value

* fixed circular dependancy problem

* spelling mistake

Co-authored-by: Hagedoorn, J.P. (pieter) <j.p.hagedoorn@students.uu.nl>
2022-05-01 02:14:13 +10:00
YetAnotherOldGit
1da7a99fb9 Swapped char data types to uint8
Swapped char data types to uint8 to avoid index datatype errors in compilation under arduino ide.
2021-08-25 21:07:32 +02:00
lemmingDev
eb6edf8b6e NimBLE library used as default 2021-06-28 08:43:21 +10:00
lemmingDev
0a8f8eab16 Configurable HID 2021-04-09 20:45:13 +10:00
lemmingDev
7217ec3677 64 buttons, added 2 sliders, all axes 16bit
Library now additionally supports:
- 2 sliders
- 64 buttons (up from 32)
- 16bit on all axes (left/right triggers and sliders are unsigned, left/right thumbsticks are centered on zero)
- updated examples
2021-01-13 16:28:48 +10:00
lemmingDev
5e15b7f960 Ability to update individual axes
void setX(int16_t x = 0);
  void setY(int16_t y = 0);
  void setZ(int16_t z = 0);
  void setRZ(int16_t rZ = 0);
  void setRX(int16_t rX = 0);
  void setRY(int16_t rY = 0);
2021-01-09 23:16:42 +10:00
lemmingDev
3f78c7ac83 Individual axes can be set
Now, each axis/hat can be set independently

setLeftThumb takes 2 int16_t parameters for x and y axes
setRightThumb takes 2 int16_t parameters for z and rZ axes
setLeftTrigger takes 1 char parameter for rX axis
setRightTrigger takes 1 char parameter for rY axis
setHat takes a hat position as above (or 0 = centered and 1~8 are the 8 possible directions)

Axes/hat can still be set all at once with setAxes

Library can now disable the aotoReport feature (enabled by default), and manually call the sendReport() function when wanted
2021-01-07 22:17:37 +10:00
lemmingDev
d046a6ce41 Change device ID
Change device ID so Windows recognises it as a new controller, so the game controller control panel currently names the amount of buttons after the recent library change
2020-11-29 08:07:38 +10:00
lemmingDev
3018600dbd 32 buttons and X,Y,Z and rZ axes are now 16 bit
Library now supports 32 buttons
X,Y,Z and rZ axes are now 16 bit int16_t (-32767 to 32767) instead of 8 bit (-127 to 127)

If you're upgrading, remember to account for this when setting your axes values
2020-11-28 13:43:27 +10:00
lemmingDev
2a6256e841 Attempt to add iOS compatibility 2020-11-22 13:38:40 +10:00
lemmingDev
ce8cf9e981 Update BleGamepad.cpp
fix previous commit error bleKeyboardInstance --> BleGamepadInstance
2020-05-08 17:50:43 +10:00
Vladimir Dronnikov
7b6ed11ba8 Update BleGamepad.cpp 2020-04-26 06:55:30 +03:00
Marco Graf
599dcda97e setting battery level also in hid, if it was created, yet. Accordingly to commit on ESP32-BLE-Mouse
replaced tabs with spaces
2020-02-20 22:00:26 +01:00
lemmingDev
32306c3d11 Thumbsticks are now passed to setAxes as unsigned chars (0 ~ 255) (255 being fully depressed) 2019-09-17 21:02:13 +10:00
lemmingDev
3ed1c21ac5 Add files via upload 2019-09-14 18:32:50 +10:00