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
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
7e449d2d3a
Replaced all double variables with float
2015-10-12 13:20:48 +02:00
Kristian Lauszus
c5c761aec5
Reduced code size in PS3BT by removing some unnecessary variables
2014-09-09 16:39:57 -07:00
Kristian Lauszus
285b21cdbc
Check HCI Handle using function in BluetoothService class
2014-09-09 16:38:42 -07:00
Kristian Lauszus
106aff6411
Call registerBluetoothService in BluetoothService constructor
...
I needed to move the BluetoothService class down after the BTD class in order for it to work
2014-09-09 16:32:46 -07:00
Kristian Lauszus
25c8d87ba2
Added several variables to BluetoothService class
...
Also moved attachOnInit function into BluetoothService class, but this really belong somewhere else
2014-09-02 02:02:17 -07:00
Kristian Lauszus
a042e5a849
Simplify how PS3 printStatusString prints the string
2014-03-07 02:12:39 +01:00
Kristian Lauszus
983a7d664f
Added getLastMessageTime() - this is useful if you want to detect if the connection is lost with the PS3 controller
...
Credit: Thomas Frederick
2014-02-25 19:37:57 +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
14fda1372c
Fix annoying warnings and provide an optimization.
2013-12-29 23:53:24 -05:00
Andrew J. Kroll
f1af9b08ec
Janitorial, whitespace fixes. No new code.
2013-12-25 05:09:57 -05:00
Kristian Lauszus
ddaa6f0220
Fixed “comparison between signed and unsigned integer expressions” warning
2013-12-18 23:01:01 +01:00
Kristian Lauszus
92c7a64309
Store all strings in getStatusString() in flash
2013-12-16 09:16:12 +01:00
Kristian Lauszus
1ef78c3674
Do not hardcode identifier when disconnecting
2013-12-13 10:38:41 +01:00
Kristian Lauszus
809e80a1b0
Clear and set flags in a more readable way
2013-12-11 09:59:58 +01:00
Kristian Lauszus
ed36d04e7c
Move all L2CAP states etc. into BTD.h, so the different drivers does not conflict when used together
2013-12-11 09:29:38 +01:00
Kristian Lauszus
31951e85ff
Decreased delay between commands
2013-11-24 16:54:42 +01:00
Kristian Lauszus
0ce8575603
Cleanup
2013-11-17 20:13:33 +01:00
Kristian Lauszus
5b793db3e3
Can now call setLedOff without any argument, to turn all LEDs off
2013-11-15 23:19:10 +01:00
Kristian Lauszus
0bd0078c6d
Updated comments
2013-11-12 19:38:18 +01:00
Kristian Lauszus
b08e89a6f9
Updated comment about how to activate serial debugging
2013-11-11 11:48:09 +01:00
Kristian Sloth Lauszus
8e6ab3f3ae
Clear buttonState properly
...
Caused an issue on some dongles
2013-07-20 22:07:03 +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
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
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
Kevin Mark
970ca7890e
0 -> 0x00
2013-03-30 04:18:08 -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
Kristian Sloth Lauszus
391f5ece4d
Fixed conflict between analog buttons and digital buttons
2013-01-27 22:02:33 +01:00
Kristian Sloth Lauszus
8ed3fcd3b8
The Wii and PS3 libaries can now be used at the same time
2013-01-27 21:25:50 +01:00
Kristian Sloth Lauszus
c4563ec7c8
Added activeConnection, so multiple controller can connect fast without any issues
2013-01-20 22:33:54 +01:00
Kristian Lauszus
70eaa7732c
Improved sensor reading
2012-10-04 19:28:27 +02:00
Kristian Lauszus
81c7f22417
Added get9DOFValues
...
Thanks to Manfred Piendl for finding the values needed to convert the
Move sensor data into units
2012-10-02 02:05:07 +02:00