336 Commits

Author SHA1 Message Date
Ryan Pavlik
3d21a25822 Make disable_expansion reset expansion state to 0.
Lets you unplug expansions and replug or plug a different one.
2012-06-28 16:24:50 -05:00
Ryan Pavlik
e8a7ad62fc If no handshake data received from the expansion, disable it.
Should give it a chance to re-handshake instead of getting
stuck in "case 3"
2012-06-28 16:23:56 -05:00
Ryan Pavlik
713456b563 In expansion handshake, read data after saying we'd like it. 2012-06-28 16:23:10 -05:00
Ryan Pavlik
abf13bae58 Add debug display of joystick calibration data. 2012-06-28 16:21:57 -05:00
Ryan Pavlik
c800a049dc Use the right sqrt for floats in C. 2012-06-28 16:21:18 -05:00
Ryan Pavlik
29e5fabeac Use atan2f instead of atan and weird adjustments.
This should keep the angle values in [0, 360]
just as apparently intended before.
2012-06-28 16:21:02 -05:00
Ryan Pavlik
2db3dd3a03 Factor out the application of a two-domain mapping ('calibration').
Replaces repeated code, and should be more reliable as well as
avoiding division by 0.
2012-06-28 16:19:31 -05:00
Ryan Pavlik
84fb39dcb3 Add some debug messages 2012-06-28 16:17:37 -05:00
Ryan Pavlik
ab67501959 don't need much of windows.h, just a little. 2012-05-01 19:14:02 -05:00
Ryan Pavlik
434e53592a A little warning cleanup 2012-05-01 19:13:48 -05:00
Ryan Pavlik
3ad3c396be Merge pull request #18 from godbyk/spellcheck
Fixed spelling errors.
2012-02-20 13:06:52 -08:00
Kevin M. Godby
c7bcd7aecd Fixed a few spelling errors. 2012-02-18 00:46:16 -06:00
Juan Sebastian Casallas
47da0f6e10 Merge pull request #15 from jscasallas/master
Solved the "if unable to write, then relaunch" issue on Mac.
Mac is now "fully supported"
2012-01-16 21:12:42 -08:00
Juan Sebastian Casallas
e9f9b0a842 CHANGELOG: Reference added Mac support 2012-01-16 23:08:22 -06:00
Juan Sebastian Casallas
3590fc1b92 README: Remove the "if unable to write, then relaunch" issue on Mac
-This issue was solved by reopening the output channel on write fail
2012-01-16 22:48:05 -06:00
Juan Sebastian Casallas
5cfa33a8a8 [mac] Reopen outputChannel on wiiuse_io_write failure
-The first write on ouputChannel may fail
-Subsequent write calls are also prone to failure
-Reopening the channel on failure should solve this problem
2012-01-16 21:41:18 -06:00
Juan Sebastian Casallas
5ed42458f3 [mac]wiiuse_io_read: Add buffer and length parameters
-According to the new signature for wiiuse_io_read
2012-01-16 21:31:54 -06:00
Juan Sebastian Casallas
aef7ec45f8 motion_plus.c: Revise some includes
-wiiuse_internal.h was already included via motion_plus.h
-io.h is needed for wiiuse_read
2012-01-16 19:24:15 -06:00
Juan Sebastian Casallas
ddc645e125 pre-declare wiiuse_motion_plus on motion_plus.h
-This ensures the function can be called outside of motion_plus.c
-Also eliminates an explicit declaration warning on events.c
2012-01-16 19:21:41 -06:00
Juan Sebastian Casallas
1b25cd6289 Replace explicit 32 lengths for MAX_PAYLOAD 2012-01-16 18:34:38 -06:00
Jan Ciger
2e347bc523 Changed the initial handshake to be synchronous
Made the Motion+ init a lot more robust
Code cleanup
2012-01-16 13:35:48 -06:00
Jan Ciger
ce9e1b6156 added forgotten Balance board support 2012-01-16 13:35:44 -06:00
Ryan Pavlik
0bfebc4565 Merge pull request #11 from jscasallas/wiic_mac
Mac support based on WiiC
2011-11-30 14:30:21 -08:00
Juan Sebastian Casallas
240ef2f3f9 events.c: Clear event buffer after propagating in Mac
-The line was previously commented-out
-Even if the instruction is not vital, uncommenting it makes mac polling consistent with unix and windows polling
2011-11-30 19:27:20 +01:00
Juan Sebastian Casallas
87eba20df3 README.mkd: Update contributors and add Mac usage
-Added Gabriele Randelli from WiiC and Juan Sebastian Casallas to the contributor list
-Added Mac OS X minimal requirements to "Platforms and Dependencies"
-Added Mac to "Compiling"
-Added an extra line for build to make sure you make the directory
-Added known Mac-connection issues
-Added Mac support to the list of WiiC's features
2011-11-23 01:16:27 +01:00
Juan Sebastian Casallas
b208c940df example-sdl: include correct OpenGL and GLUT headers in Mac
-OpenGL and GLUT Mac header paths differ from other platforms
-ifdef-ed to include the correct headers depending on the platform
2011-11-23 00:04:27 +01:00
Juan Sebastian Casallas
e8126a1dca Update headers on io_mac, wiiuse and wiiuse_internal
-These are mostly copyright and consistency issues
-On io_mac.h/m prepended "based on io_mac.h/m from WiiC,"  to "written by: Gabiele Randelli" 
and specified the files as part of wiiuse instead 
of wiiC.
-On wiiuse.h and wiiuse_internal.h gave credit to WiiC
and Gabiele Randelli for Mac-specific class codes 
and wiimote_t members
2011-11-23 00:04:02 +01:00
Juan Sebastian Casallas
d9e72fe730 Change scope of propagate_event for use in io_mac.m
-propagate_event was static in events.c
-io_mac.m uses propagate_event when receiving data before finishing the handshake
2011-11-22 23:29:49 +01:00
Juan Sebastian Casallas
257b94659d Add io_mac files from wiic, update wiiuse definitions
-Used io_mac.h/.m from wiic and added them to CMakeLists
-Define WIIUSE_MAC on wiiuse.h and wiiuse_internal.h
-Implemented wiiuse_poll when WIIUSE_MAC is defined
-Added Mac-specific includes to wiiuse.h and wiiuse_internal.h
-Added Mac-specific members to wiimote_t on wiiuse.h
-Added Mac-specific WM_DEV_CLASS definitions to wiiuse_internal.h
-Modified wiiuse_poll for use with Mac
-Added init and cleanup functions to io_mac.m
2011-11-22 23:13:40 +01:00
Ryan Pavlik
a46c91049e Re-structure top of readme, adding mailing list and bug tracker 2011-11-22 14:33:01 -06:00
Ryan Pavlik
bc205d42b7 update changelog to mention m+ example 2011-10-03 08:26:07 -05:00
Ryan Pavlik
7b9edd0d2e Merge remote-tracking branch 'janoc/janoc-mplus-rebased' 2011-10-03 08:22:45 -05:00
Jan Ciger
1141a9cf62 added demo for Motion+ 2011-10-02 19:22:27 +02:00
Ryan Pavlik
e053dae20a Merge remote-tracking branch 'origin/motionplus' 2011-09-27 17:28:52 -05:00
Ryan Pavlik
bbc706b5f7 Merge pull request #7 from janoc/janoc-mplus-rebased
Janoc mplus rebased
2011-09-27 15:24:41 -07:00
Jan Ciger
97768bf63c Added documentation 2011-09-15 02:31:49 +02:00
Jan Ciger
5be24736b0 Added section on Motion+ in known issues 2011-09-15 02:30:09 +02:00
Jan Ciger
1c5bb6cb33 Removed unused variables 2011-09-15 01:32:09 +02:00
Jan Ciger
3c9cfdf656 Renamed variables to something more descriptive, removed unused code 2011-09-15 01:29:43 +02:00
Ryan Pavlik
446731114c remove #if 0 code. 2011-09-14 14:51:50 -05:00
Ryan Pavlik
60570ea8d3 update changelog to mention windows improvement 2011-09-14 13:03:36 -05:00
Ryan Pavlik
f7b198e0e6 Remove old encrypted expansion codes - no longer needed 2011-09-14 13:02:41 -05:00
Ryan Pavlik
e1fcc8266c more IWYU include comments 2011-09-14 13:02:30 -05:00
Ryan Pavlik
a1883ee160 Add Jan Ciger to changelog and readme 2011-09-14 12:15:25 -05:00
Ryan Pavlik
61f1e7e18d add comments from include-what-you-use 2011-09-14 10:34:12 -05:00
Ryan Pavlik
ea793369f6 Fix mingw build 2011-09-14 10:34:12 -05:00
Jan Ciger
44dcb16c58 Windows compilation fixes 2011-09-14 10:34:09 -05:00
Jan Ciger
9ae7f37396 Added expansion detection from fWiine
Added gyro rate calculations & calibrations from WiiC

Conflicts:

	src/events.c
	src/io.c
	src/motion_plus.c
	src/wiiuse_internal.h
2011-09-14 10:34:04 -05:00
Jan Ciger
80e8fa37ac cleanup
Conflicts:

	src/events.c
	src/io.c
	src/wiiuse.c
	src/wiiuse.h
2011-09-14 10:33:59 -05:00
Jan Ciger
9b5ef23276 More fWiine merging
Conflicts:

	src/events.c
	src/motion_plus.c
	src/wiiuse.h
2011-09-14 10:33:54 -05:00