Commit graph

54 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
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
eb3a258aa6 Remove execute permission from source files 2016-04-26 17:00:44 +02:00
Kristian Sloth Lauszus
421e8dea4b Fixed some documentation in the Wii driver 2016-04-19 18:10:01 +02:00
Kristian Sloth Lauszus
00658d60eb Fixed typo 2016-04-19 11:48:51 +02:00
Kristian Sloth Lauszus
7e449d2d3a Replaced all double variables with float 2015-10-12 13:20:48 +02:00
Kristian Sloth Lauszus
e4c581c991 The is no need for Wii calibration flag to have its own variable 2015-04-20 23:39:57 +02:00
Kristian Sloth Lauszus
9426e4192d Updated some variables names and updated some debug messages 2015-04-16 20:19:33 +02:00
Kristian Sloth Lauszus
7334f7e9a4 Changed some variable names and simplified the way the weight is calculated
There was actually a bug, as it will return 0 if wiiBalanceBoardRaw[pos] is exactly the same as wiiBalanceBoardCal[1][pos]
2015-04-16 19:45:03 +02:00
Kristian Sloth Lauszus
d2511df4a1 Move functions into .cpp file 2015-04-16 17:00:07 +02:00
Kristian Sloth Lauszus
7acf598a59 Convert Wii Balance Board readings into kg 2015-04-16 16:55:35 +02:00
Kristian Sloth Lauszus
9cb31799a8 Fix initialisation of extension bug in status report.
The first status report were missed because checkExtension had to be true.
Should fix bug reported here: http://blog.tkjelectronics.dk/2012/08/wiimote-added-to-usb-host-library/#comment-500635
2015-04-16 16:50:08 +02:00
Kristian Sloth Lauszus
e555195e42 Print raw Wii Balance Board values in example 2015-04-16 02:26:18 +02:00
Kristian Sloth Lauszus
b1902b2a55 Initial support for Wii Balance Board
Still need to convert readings into something meaningful
2015-04-16 01:57:00 +02:00
Kristian Sloth Lauszus
881c4df046 Merge branch 'master' into dev
Conflicts:
	BTD.h
	BTHID.h
	PS3BT.h
	SPP.h
	Wii.h
2015-02-24 01:28:28 +01:00
Andrew J. Kroll
196a0b69be Fix all demos, fix all wrong uses of virtual keyword, some spacing cleanup. 2014-11-10 01:35:13 -05: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
e2bf041286 Updated some more comments 2014-01-19 17:14:09 +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
Kristian Lauszus
f676812f84 Code for the Wii IR camera needs to be activated in settings.h now
Also cleaned up README.md a bit
2013-12-30 16:19:34 +01:00
Kristian Lauszus
8ae6f8bb1d Updated comments - especially in BTHID.h 2013-12-30 16:05:50 +01:00
Andrew J. Kroll
f1af9b08ec Janitorial, whitespace fixes. No new code. 2013-12-25 05:09:57 -05:00
Kristian Lauszus
0b2e444e7b Fixed macros in Wii.h as well 2013-12-13 11:27:05 +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
f783b97cb9 Initial commit for BTHID library
To see incoming data uncomment PRINTREPORT in BTHID.cpp
2013-11-24 21:55:15 +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 Sloth Lauszus
d20ae89818 Only calculate angle when it is needed 2013-10-21 18:41:47 +02:00
Kristian Sloth Lauszus
d0ec18ab44 Fixed disconnect problem when using the old Wiimote with the external MotionPlus extension
Now also updates the batteryLevel when getBatteryLevel is called
2013-07-18 19:43:21 +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
Kristian Sloth Lauszus
305eeb0820 Added pair function 2013-05-06 23:32:00 +02:00
Kristian Sloth Lauszus
831d18016e Added setLedRaw 2013-04-01 15:38:15 +02:00
Kristian Sloth Lauszus
219bd50c30 statusRequest is now public 2013-03-30 16:24:08 +01:00
Andrew J. Kroll
904f2ff25a Clean up code formatting to industry standards. 2013-03-28 04:46:43 -04:00
Kristian Sloth Lauszus
2266398b28 Updated documentation 2013-02-17 01:25:49 +01:00
Kristian Sloth Lauszus
1333e9a63b Updated comments to work with Doxygen 2013-02-05 19:51:45 +01:00
Kristian Sloth Lauszus
355ca892eb Added support for Wii U Pro Controller 2013-02-02 22:14:01 +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
bb8bdab3ba Track up to four objects using the IR camera
The state of the Wiimote can now also be read including the battery
level
2013-01-23 22:28:40 +01:00
Kristian Sloth Lauszus
ac4fc92ea7 The library now also support multiple Wiimotes 2013-01-20 22:46:04 +01:00
Kristian Sloth Lauszus
1cb937b2a1 Moved things around and change a couple of names 2013-01-17 00:47:19 +01:00
Kristian Sloth Lauszus
3acafa2634 Minor edit 2013-01-17 00:13:09 +01:00
Kristian Sloth Lauszus
eb088895f5 Added support for the IR Camera inside the Wiimote
Thanks to Allan Glover: https://github.com/Engr-AllanG
2013-01-17 00:07:56 +01:00
Kristian Lauszus
36044a4356 Minor edit 2012-10-08 17:29:30 +02:00
Kristian Lauszus
d445689813 Fixed bug when pairing 2012-10-07 19:44:27 +02:00
Kristian Lauszus
ebb333de9a Now able to pair with Wiimote 2012-10-07 14:50:51 +02:00
Kristian Lauszus
02719f4c92 Added setLedStatus()
This will give some feedback to the user about which extensions is
currently connected
2012-10-06 16:42:00 +02:00
Kristian Lauszus
2182ec9a97 Added comment about difference bewteen getButtonPress and getButtonClick 2012-10-03 21:29:44 +02:00