Commit graph

1374 commits

Author SHA1 Message Date
David Madison 2fe5574e71 Change button values function to constexpr
Requires a chained ternary in place of a switch for compatibility with older compilers.
2021-03-27 08:37:01 -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 5753cc661a Reorganized ButtonEnum list
Trying to form a more logical order based on how these are used.
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
Kristian Sloth Lauszus a321ad36ab Release version 1.5.0 2021-03-25 19:06:34 +01:00
Kristian Sloth Lauszus a7ba1aa15f
Merge pull request #615 from felis/adafruit_feather_nrf52840
The Adafruit Feather nRF52840 Express is now a supported board
2021-03-24 14:37:29 +01:00
Kristian Sloth Lauszus 0b4213319b Include <avr/dtostrf.h> for the Adafruit Feather nRF52840 Express manually 2021-03-24 13:41:18 +01:00
Kristian Sloth Lauszus a121516eff Install adafruit-nrfutil, as it is needed for building the application even though it is only used for uploading 2021-03-24 13:07:15 +01:00
Kristian Sloth Lauszus 3be8da5ff6 Ignore 'unused-variable' warnings as well 2021-03-23 13:34:15 +01:00
Kristian Sloth Lauszus f31bca66d5 Also ignore 'unused-function' warnings 2021-03-23 13:02:04 +01:00
Kristian Sloth Lauszus 4d20580b18 Workaround "warning: comparison between signed and unsigned integer expressions" in the Arduino core 2021-03-23 12:53:33 +01:00
Kristian Sloth Lauszus 10a17b4ae3 The Adafruit Feather nRF52840 Express is now a supported board 2021-03-23 12:46:31 +01:00
Kristian Sloth Lauszus b435996557
Merge pull request #614 from josephduchesne/master
Added support for Adafruit NRF52840 Feather Express
2021-03-23 12:33:05 +01:00
Joseph Duchesne e93c24df6f Fixed small typo 2021-03-22 09:31:54 -04:00
Joseph Duchesne a56613ae66 Added support for Adafruit NRF52840 Feather Express
Added definitions for Adafruit NRF52840 Feather Express based on the
existing RBL_NRF51822 variant. The PS5 controller and USB_desc examples
have been tested and seem to work fine with a knockoff Duinofun USBmini
2.0 shield (after accounting for the mislabled pins on this hardware,
and cutting the USB VDD trace to wire it to 5V).
2021-03-22 09:28:22 -04:00
Kristian Sloth Lauszus 37c7c5155a Fixed copyright year 2021-02-06 20:41:32 +01:00
Kristian Sloth Lauszus 47ba510d29
Merge pull request #599 from dennisfrett/master
Add support for MiniDSP 2x4HD
2021-02-06 20:40:15 +01:00
Dennis Frett 54e8728a30 Re-add deleted files. 2021-02-05 23:30:13 +01:00
Dennis Frett dfe3b79bae Fix callbacks not being invoked. 2021-02-05 20:09:30 +01:00
Dennis Frett 0d57603adb Update copyright header + Arduino example indentation. 2021-02-05 11:49:23 +01:00
Dennis Frett 17cb44b5a2 Applied @xxxajk's formatting. 2021-02-05 10:43:02 +01:00
Dennis Frett df0a711a3a Review comments. 2021-02-04 23:44:12 +01:00
Dennis Frett a4e9521c4a Fix signed/unsigned comparison. 2021-02-04 19:39:55 +01:00
Dennis Frett 715fef691f Add support for MiniDSP 2x4HD. 2021-02-04 19:18:40 +01:00
Kristian Sloth Lauszus e10f89da72
Merge pull request #596 from YuuichiAkagawa/pr_usbh_midi_fix#586
Fix for handling MIDI channels in the bidirectional converter example
2021-02-01 17:39:37 +01:00
Yuuichi Akagawa ecce90052c add comment 2021-02-02 00:16:16 +09:00
Yuuichi Akagawa e81b04519c Hub commented out 2021-01-29 07:33:17 +09:00
Yuuichi Akagawa 66b03d99d6 Fix for handling MIDI channels in the bidirectional converter example (#586) 2021-01-29 07:26:53 +09:00
Kristian Sloth Lauszus b4bbfecd09 Store the timestamp of the last Bluetooth DATA input report received on the interrupt channel
This can be used detect if the connection to a Bluetooth device is lost fx if the battery runs out or it gets out of range
2021-01-26 23:43:59 +01:00
Kristian Sloth Lauszus 8758b2fc25
Merge pull request #591 from felis/fixes
Minor fixes
2021-01-24 15:41:06 +01:00
Kristian Sloth Lauszus 97eb09d43f
Merge pull request #590 from felis/xboxonesbt_rumble
Added support for rumble functionality on the Xbox One S controller via Bluetooth
2021-01-24 15:40:03 +01:00
Kristian Sloth Lauszus e82f26db7a Fix compiler warning 2021-01-24 14:41:21 +01:00
Kristian Sloth Lauszus a3e52f8ee6 Fixed typo 2021-01-24 14:40:25 +01:00
Kristian Sloth Lauszus 785886eadf The user function was called twice in the PS4BT and XBOXONESBT drivers 2021-01-24 14:36:45 +01:00
Kristian Sloth Lauszus 3915e96962 Added support for rumble functionality on the Xbox One S controller via Bluetooth 2021-01-24 14:33:44 +01:00
Kristian Sloth Lauszus 5af56accc3
Merge pull request #585 from felis/ps5
Added support for the PS5 controller
2021-01-19 22:36:05 +01:00
Kristian Sloth Lauszus 534fdb30ce Updated documentation, as the PS5 controller is now working via USB and Bluetooth 2021-01-19 20:40:06 +01:00
Kristian Sloth Lauszus fdb0ee31e7 Do not try to parse the PS5 status byte for now 2021-01-19 20:29:04 +01:00
Kristian Sloth Lauszus 9a0a4940b3 Setting the LED, lightbar, rumble via Bluetooth is now working 2021-01-19 20:28:47 +01:00
Kristian Sloth Lauszus 28a75dea6b PS5 is now also working via Bluetooth
However the output report is still not working
2021-01-17 23:35:10 +01:00
Kristian Sloth Lauszus ee7bf6e5a0 PS5 controller is now working via USB 2021-01-17 20:28:57 +01:00
Kristian Sloth Lauszus fba77f9119
Merge pull request #584 from DanielGibson/unify-hidcomposite-hiduniversal
Unify HIDComposite and HIDUniversal
2021-01-17 17:47:29 +01:00
Daniel Gibson 4214caff70 Derive HIDUniversal from HIDComposite
They were mostly the same, I only had to keep the original
version of Poll() because while the differences are very small,
I don't think that unifying them is possible without needlessly
complicating things.
For this to work I had to make the private fields of HIDComposite
protected instead. I took the "+1" in HIDInterface::epIndex[]
from the original HIDUniversal class.
2021-01-13 15:46:46 +01:00
Daniel Gibson 323de96d6e HIDUniversal: Remove unused member and methods
With the comparing buffer/removing duplicates functionality gone,
prevBuf, BuffersIdentical() and SaveBuffer() aren't used anymore.
2021-01-13 10:59:35 +01:00
tomasyk f66d02d608 Remove comparing bufffer functionality
I am using HID for Oregon Scientific WMRS200, and polling reports removed any sequence of 2 or more identical characters, e.g. instead valid sequence
FF FF 0 42 0 B8 0 2C 3C 0 0 0 62 1
i get
FF 0 42 0 B8 0 2C 3C 0 62 1
There is no need to compare previous buffer with current buffer, as they can be identical and still this should not be ignored. My sequences are built from smaller sequences, where first byte is lenght of sequence to concatenate. Usually it is concatenated from sequences of 1 byte. E.g. 01 FF, 01 FF, 01 00, 01 42 etc. But current code is filtering second 01 FF and result is only one FF in sequence, instead of FF FF. Filtering is not needed, because data are obtained using inTransfer.
2021-01-13 10:56:16 +01:00
Kristian Sloth Lauszus a60d277427
Merge pull request #583 from DanielGibson/fix-hidInterfaces-overflow
HIDUniversal, HIDComposite: Don't overflow hidInterfaces[] or epInfo[]
2021-01-13 10:25:01 +01:00
Daniel Gibson 3658dc68f3 Increase USBHID::maxHidInterfaces from 3 to 5
It's not that uncommon to have more than three HID interfaces in a
USB device - even an Arduino Leonardo (or Pro Micro) always has
two just for the CDC; if you add a Boot Keyboard HID interface and
one generic HID interface for consumer control (multimedia) keys
you already have four..
Many commercial gaming keyboards also have more then three interfaces
(I don't think they really need that many but it is what it is).
2021-01-13 08:59:33 +01:00
Daniel Gibson 6d7984ade2 Log info when not adding Interface/Endpoint because max is reached 2021-01-13 07:14:36 +01:00
Kristian Sloth Lauszus a1dd6ff890
Merge pull request #574 from dmadison/xbox-core
Add Xbox Core Controller PID
2021-01-12 21:09:05 +01:00