Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RF24
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
RF24
Commits
7b401d72
Commit
7b401d72
authored
Aug 01, 2011
by
maniacbug
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve pingpair timing. Should lead to less timeouts.
parent
c9d64fd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
examples/pingpair/pingpair.pde
examples/pingpair/pingpair.pde
+5
-1
No files found.
examples/pingpair/pingpair.pde
View file @
7b401d72
...
...
@@ -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
>
2
5
0
)
if
(
millis
()
-
started_waiting_at
>
2
0
0
)
timeout
=
true
;
// Describe the results
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment