Closed GoogleCodeExporter closed 9 years ago
There's no way to know the difference between "still waiting" and no ping
result. If there's no ping result, it's still waiting. All that we know is
that EITHER it's out of range OR no ping result.
The current code already tracks "still waiting" when sonar.check_timer()
returns false. This needs to be polled anyway, so there's no saving and you
can't access ping_result directly as a result. It could be done to set
ping_result to zero if the ping times out. But, I feel that's wasted code as
all you know is that it's "all clear".
Basically, the only time you should be doing something with the ping_result
value is when check_timer() returns a true value. False values tell you that
it hasn't got a ping yet. This is designed to alert you when something is in
range, not inform you of the status of the ping. If you need to know the
status of the ping, you will need outside code as you're doing now.
Original comment by eckel.tim
on 15 Jul 2013 at 1:56
[deleted comment]
Please report this in a more appropriate place.
Original comment by eckel.tim
on 19 Sep 2013 at 6:58
Original issue reported on code.google.com by
raven...@gmail.com
on 22 Feb 2013 at 10:49