From 01e0e6cf2d0aea1da8512d979c904dae889efe15 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 8 Oct 2013 18:52:37 +0200 Subject: [PATCH] Don't clear pairWithWii --- BTD.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BTD.cpp b/BTD.cpp index 993e2540..921b0714 100755 --- a/BTD.cpp +++ b/BTD.cpp @@ -300,7 +300,7 @@ void BTD::clearAllVariables() { } connectToWii = false; - pairWithWii = false; + incomingWii = false; bAddress = 0; // Clear device address bNumEP = 1; // Must have to be reset to 1 qNextPollTime = 0; // Reset next poll time @@ -413,7 +413,7 @@ void BTD::HCI_event_task() { break; case EV_INQUIRY_COMPLETE: - if (inquiry_counter >= 5) { + if (inquiry_counter >= 5 && pairWithWii) { inquiry_counter = 0; #ifdef DEBUG_USB_HOST Notify(PSTR("\r\nCouldn't find Wiimote"), 0x80);