Commit graph

61 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 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 42948831ce Explicit cast millis() and micros() to uint32_t, as it is uint64_t on the Arduino 101 2017-02-12 16:58:14 +01:00
Kristian Sloth Lauszus 6fb48f48e4 Fix millis() and micros() rollover bug
Also replace long with int32_t, so it is not architecture dependent
2017-02-12 15:10:07 +01:00
Kristian Sloth Lauszus eb3a258aa6 Remove execute permission from source files 2016-04-26 17:00:44 +02:00
Kristian Sloth Lauszus 405c126921 Merge pull request #215 from sieren/fix-new-rbl-sdk
Make USBH work with new RedBear SDK for nRF51288
2016-03-21 14:52:15 +01:00
Matt Sieren 51cb078fa0 Exclude specific enum defines and cast
The unscoped Enum for the Controller LEDs is colliding
with changes in the recent RedBearLab nRF51288 SDK, specifically
the PinName enum in the mbed.h header file.
As a simple RBL/mBed specific work-around we are now casting
the LED enums into the USBH LEDEnum enum.

This will potentially break support for controllers on RBL,
but restore the ability to compile the project.
2016-03-18 22:42:23 +01:00
matt-bull 0f80087ee7 Have PS3.printStatusString() print to a new line each time it is called. 2016-02-09 20:49:47 +01:00
Kristian Sloth Lauszus 627c0ebc77 Store rumble value in local buffer, so the rumble is not affected when setting the LEDs
Fixes #186
2016-01-19 18:27:45 +01:00
Kristian Sloth Lauszus fb723fcbb0 Don't set epAttribs to 0, as this will set bmNakPower to 0 as well. Instead set bmSndToggle and bmRcvToggle explicit to 0.
Fixes: #184
2015-11-18 00:11:33 +01:00
Kristian Sloth Lauszus fe12f0ede1 Merge pull request #178 from felis/STM32F4
Added support for STM32F446 Nucleo board
2015-11-07 15:12:39 +01:00
Kristian Sloth Lauszus 7e449d2d3a Replaced all double variables with float 2015-10-12 13:20:48 +02:00
Kristian Sloth Lauszus acfcba6fa6 Replace deprecated byte variable with uint8_t 2015-10-12 10:52:51 +02:00
Kristian Sloth Lauszus a2265ea0a9 All these files changes were changed in: bc8000f782
I suspect Andrew used force push to overwrite the history
2015-03-19 18:11:22 +01:00
Andrew J. Kroll 46dc4e6fec fix conflict, fix case on include for hid.h (regression?) 2015-03-14 04:54:28 -04:00
Kristian Lauszus bde11036a9 Endpoints types where already defined in usb_ch9.h, so no need to redefine them 2014-09-02 00:16:48 -07:00
Kristian Lauszus a042e5a849 Simplify how PS3 printStatusString prints the string 2014-03-07 02:12:39 +01:00
Kristian Lauszus 1f33f2bd08 Renamed getStatusString() to printStatusString() 2014-01-04 14:14:22 +01:00
Kristian Lauszus 257c96f5c1 Can now turn LED off by calling setLedOn(OFF) for all controllers
Also renamed all enums, so they does not conflict with user code that easily
2014-01-04 13:43:49 +01:00
Andrew J. Kroll f1af9b08ec Janitorial, whitespace fixes. No new code. 2013-12-25 05:09:57 -05:00
Andrew J. Kroll 77efe42a71 Fix hidboot not allocating or checking properly on mouse.
Removal of duplicate code: Force all drivers to delay after setting address.
2013-12-18 22:02:51 -05:00
Kristian Lauszus b4bb7c9244 Fixed some bugs introduced in e18eb57752 2013-12-06 22:58:16 +01:00
Andrew J. Kroll 95d133b919 Merge 2013-12-04 18:51:06 -05:00
Andrew J. Kroll e18eb57752 fix all warnings for ARM, fix a few small bugs 2013-12-04 18:40:23 -05:00
Kristian Lauszus 16c4272358 Can now get Bluetooth address inside PS3 controller - can also get calibration data inside move controller
Also updated some comments and cleanup
2013-11-12 19:44:12 +01:00
Kristian Lauszus b08e89a6f9 Updated comment about how to activate serial debugging 2013-11-11 11:48:09 +01:00
Kristian Sloth Lauszus 65ba9c1366 Minor 2013-07-20 12:57:23 +02:00
Kristian Sloth Lauszus 2ce56b0968 Merge branch 'master' into xxxajk
Conflicts:
	PS3USB.cpp
2013-07-16 17:07:25 +02:00
Kristian Sloth Lauszus 4dc4958e41 Updated comment 2013-07-15 20:17:28 +02:00
Kristian Sloth Lauszus b957f5f4dc Added delay after setting address 2013-07-15 19:34:56 +02:00
Kristian Sloth Lauszus 9f855fca16 Check Bluetooth address before trying to set it 2013-07-15 18:22:13 +02:00
Kristian Sloth Lauszus 2dc817f84a Added attachOnInit
This will allow the user to call a function when the controller is initialized
2013-07-14 00:43:35 +02:00
Andrew J. Kroll e01df49bf3 refactor entire library for hex printing 2013-06-17 15:37:09 -04:00
Oleg Mazurov 261e5f1bd2 commit 2013-06-11 21:11:43 -06:00
Andrew J. Kroll f1e01dbaab merge with head 2013-05-16 17:03:44 -04:00
Andrew J. Kroll 814c2baf55 debugging macro fixes 2013-05-16 16:43:51 -04:00
Kristian Sloth Lauszus 1a362c5310 Shift one so it the same as setLedOn etc. 2013-05-16 19:29:59 +02:00
Kristian Sloth Lauszus 48b3ed93f5 Removed all direct calls to serial.print 2013-04-26 23:50:39 +02:00
Kristian Sloth Lauszus 39c3039415 Removed double instance of the same code 2013-04-03 21:28:44 +02:00
Kristian Sloth Lauszus bbfd49310c Forgot some return statements in case the controller isn't connected 2013-04-03 18:12:05 +02:00
Kristian Sloth Lauszus a890d4aca8 Moved PS3 report buffer into PS3Enums 2013-04-02 00:12:38 +02:00
Kristian Sloth Lauszus 831d18016e Added setLedRaw 2013-04-01 15:38:15 +02:00
xxxajk bd9307702c Merge pull request #44 from felis/xxxajk
Xxxajk and done.
2013-03-30 09:06:14 -07:00
Andrew J. Kroll 5ec8889fa3 Unify a bunch of debug fail messages to a single point. More needed. 2013-03-30 10:29:16 -04:00
Kevin Mark f3342aa589 Code cleanup 2013-03-30 04:15:25 -04:00
Kevin Mark 67a8989cef Removed duplicate code from PS3BT/PS3USB's setRumbleOn 2013-03-30 03:43:36 -04:00
Kevin Mark adff5d790d Overloaded PS3BT/PS3USB's setRumbleOn to accept custom rumble settings. 2013-03-30 03:42:52 -04:00
Andrew J. Kroll 904f2ff25a Clean up code formatting to industry standards. 2013-03-28 04:46:43 -04:00
Andrew J. Kroll 9b224b9899 port debugging of new files, need to eliminate all serial.print yet. 2013-03-28 04:37:09 -04:00
Kristian Sloth Lauszus a96c3c4633 Now the XBOXRECV doesn't conflict as well
Also hci_handle is reset when you disconnect
2013-01-28 00:55:01 +01:00