Skip to content

Commit

Permalink
Improve pingpair timing. Should lead to less timeouts.
Browse files Browse the repository at this point in the history
  • Loading branch information
maniacbug committed Aug 2, 2011
1 parent c9d64fd commit 7b401d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/pingpair/pingpair.pde
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void loop(void)
unsigned long started_waiting_at = millis();
bool timeout = false;
while ( ! radio.available() && ! timeout )
if (millis() - started_waiting_at > 250 )
if (millis() - started_waiting_at > 200 )
timeout = true;

// Describe the results
Expand Down Expand Up @@ -200,6 +200,10 @@ void loop(void)

// Spew it
printf("Got payload %lu...",got_time);

// Delay just a little bit to let the other unit
// make the transition to receiver
delay(20);
}

// First, stop listening so we can talk
Expand Down

0 comments on commit 7b401d7

Please sign in to comment.