diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2009-10-06 16:32:20 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2009-10-06 16:32:20 +0000 |
commit | 4b1f6e749ef047818c12713ddbd6c8624f4ad18f (patch) | |
tree | b5618570e232f81c8053f18a93869ed218a88f0f /patches | |
parent | 3264cf646b621655547660bc076be9db79ebbad5 (diff) |
patch aganst cwiid-rev201 to retrieve information on whether the montionplus was moving fast or slow
svn path=/trunk/externals/hardware/wiimote/; revision=12541
Diffstat (limited to 'patches')
-rw-r--r-- | patches/cwiid201_motionplus_sensitivity.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/patches/cwiid201_motionplus_sensitivity.patch b/patches/cwiid201_motionplus_sensitivity.patch new file mode 100644 index 0000000..c7fc13f --- /dev/null +++ b/patches/cwiid201_motionplus_sensitivity.patch @@ -0,0 +1,48 @@ +Index: process.c +=================================================================== +--- process.c (revision 201) ++++ process.c (working copy) +@@ -249,6 +249,9 @@ + (uint16_t)data[1]; + motionplus_mesg->angle_rate[CWIID_PSI] = ((uint16_t)data[3] & 0xFC)<<6 | + (uint16_t)data[0]; ++ motionplus_mesg->low_speed[CWIID_PHI] = ((uint8_t)data[3] & 0x01); ++ motionplus_mesg->low_speed[CWIID_THETA] = ((uint8_t)data[4] & 0x02)>>1; ++ motionplus_mesg->low_speed[CWIID_PSI] = ((uint8_t)data[3] & 0x02)>>1; + } + break; + } +Index: state.c +=================================================================== +--- state.c (revision 201) ++++ state.c (working copy) +@@ -85,6 +85,9 @@ + memcpy(wiimote->state.ext.motionplus.angle_rate, + mesg->motionplus_mesg.angle_rate, + sizeof wiimote->state.ext.motionplus.angle_rate); ++ memcpy(wiimote->state.ext.motionplus.low_speed, ++ mesg->motionplus_mesg.low_speed, ++ sizeof wiimote->state.ext.motionplus.low_speed); + break; + case CWIID_MESG_ERROR: + wiimote->state.error = mesg->error_mesg.error; +Index: cwiid.h +=================================================================== +--- cwiid.h (revision 201) ++++ cwiid.h (working copy) +@@ -263,6 +263,7 @@ + struct cwiid_motionplus_mesg { + enum cwiid_mesg_type type; + uint16_t angle_rate[3]; ++ uint8_t low_speed[3]; + }; + + struct cwiid_error_mesg { +@@ -307,6 +308,7 @@ + + struct motionplus_state { + uint16_t angle_rate[3]; ++ uint8_t low_speed[3]; + }; + + union ext_state { |