Skip to content

Commit

Permalink
Add delay to manualAcknowledgements example (#953)
Browse files Browse the repository at this point in the history
#949
- Add delay to relax how often available() is called to let the radio internally do its thing
* Update examples/ManualAcknowledgements/ManualAcknowledgements.ino

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
TMRh20 and github-actions[bot] committed Mar 2, 2024
1 parent bcc7a7c commit 762705c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/ManualAcknowledgements/ManualAcknowledgements.ino
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ void loop() {
while (!radio.available()) { // wait for response
if (millis() - start_timeout > 200) // only wait 200 ms
break;
delayMicroseconds(200); // relax probing of available()
}
unsigned long end_timer = micros(); // end the timer
radio.stopListening(); // put back in TX mode
Expand Down

0 comments on commit 762705c

Please sign in to comment.