Minor edit

This commit is contained in:
Kristian Lauszus 2012-10-07 16:24:12 +02:00
parent a6d77dce92
commit 940b8e185b
2 changed files with 4 additions and 7 deletions

View file

@ -606,7 +606,6 @@ void BTD::HCI_task() {
Notify(PSTR("\r\nConnected to Wiimote")); Notify(PSTR("\r\nConnected to Wiimote"));
#endif #endif
hci_authentication_request(); // This will start the pairing with the wiimote hci_authentication_request(); // This will start the pairing with the wiimote
//connectToWii = true;
hci_state = HCI_SCANNING_STATE; hci_state = HCI_SCANNING_STATE;
} else { } else {
#ifdef DEBUG #ifdef DEBUG
@ -666,7 +665,7 @@ void BTD::HCI_task() {
PrintHex<uint8_t>(disc_bdaddr[0]); PrintHex<uint8_t>(disc_bdaddr[0]);
#endif #endif
l2capConnectionClaimed = false; l2capConnectionClaimed = false;
if(strncmp((const char *)remote_name, "Nintendo", 8) == 0) { if(strncmp((const char*)remote_name, "Nintendo", 8) == 0) {
#ifdef DEBUG #ifdef DEBUG
Notify(PSTR("\r\nWiimote is connecting")); Notify(PSTR("\r\nWiimote is connecting"));
#endif #endif

View file

@ -612,7 +612,7 @@ void WII::Run() {
} }
break; break;
case L2CAP_INIT_MOTION_PLUS_STATE: { case L2CAP_INIT_MOTION_PLUS_STATE:
stateCounter++; stateCounter++;
if(stateCounter == 1) if(stateCounter == 1)
initMotionPlus(); initMotionPlus();
@ -626,15 +626,13 @@ void WII::Run() {
l2cap_state = L2CAP_LED_STATE; l2cap_state = L2CAP_LED_STATE;
} }
break; break;
}
case L2CAP_LED_STATE: { case L2CAP_LED_STATE:
if(nunchuck_connected_flag) if(nunchuck_connected_flag)
nunchuckConnected = true; nunchuckConnected = true;
setLedStatus(); setLedStatus();
l2cap_state = L2CAP_DONE; l2cap_state = L2CAP_DONE;
break; break;
}
case L2CAP_DONE: case L2CAP_DONE:
if(unknownExtensionConnected) { if(unknownExtensionConnected) {