Added small delay in example sketch

Also fixed qNextPollTime
This commit is contained in:
Kristian Lauszus 2012-05-25 19:59:00 +02:00
parent 6b93de24ce
commit b66a8f214c
2 changed files with 3 additions and 2 deletions

View file

@ -380,9 +380,9 @@ uint8_t PS3BT::Poll()
if (!bPollEnable)
return 0;
if (qNextPollTime <= millis()) { // Don't poll if shorter than polling interval
HCI_event_task(); // poll the HCI event pipe
ACL_event_task(); // start polling the ACL input pipe too, though discard data until connected
qNextPollTime = millis() + pollInterval; // Set new poll time
HCI_event_task(); // poll the HCI event pipe
ACL_event_task(); // start polling the ACL input pipe too, though discard data until connected
}
return 0;
}

View file

@ -198,4 +198,5 @@ void loop()
Serial.println(templow);
}
}
delay(1);
}