Fixed bug when using Wiicamera with new Wiimote with MotionPlus inside

This commit is contained in:
Kristian Sloth Lauszus 2013-08-13 22:31:51 +02:00
parent c42cef8833
commit 40b0436400

View file

@ -357,6 +357,9 @@ void WII::ACLData(uint8_t* l2capinbuf) {
Notify(PSTR("\r\nMotion Plus activated in normal mode"), 0x80);
#endif
motionPlusConnected = true;
#ifdef WIICAMERA
if (!isIRCameraEnabled()) // Don't activate the Motion Plus if we are trying to initialize the IR camera
#endif
setReportMode(false, 0x35); // Also read the extension
} else if (l2capinbuf[16] == 0x00 && l2capinbuf[17] == 0xA4 && l2capinbuf[18] == 0x20 && l2capinbuf[19] == 0x05 && l2capinbuf[20] == 0x05) {
#ifdef DEBUG_USB_HOST
@ -365,6 +368,9 @@ void WII::ACLData(uint8_t* l2capinbuf) {
activateNunchuck = false;
motionPlusConnected = true;
nunchuckConnected = true;
#ifdef WIICAMERA
if (!isIRCameraEnabled()) // Don't activate the Motion Plus if we are trying to initialize the IR camera
#endif
setReportMode(false, 0x35); // Also read the extension
} else if (l2capinbuf[16] == 0x00 && l2capinbuf[17] == 0xA6 && l2capinbuf[18] == 0x20 && (l2capinbuf[19] == 0x00 || l2capinbuf[19] == 0x04 || l2capinbuf[19] == 0x05 || l2capinbuf[19] == 0x07) && l2capinbuf[20] == 0x05) {
#ifdef DEBUG_USB_HOST