Giter Site home page Giter Site logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
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

from arduino-new-ping.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
[deleted comment]

from arduino-new-ping.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Please report this in a more appropriate place.

Original comment by eckel.tim on 19 Sep 2013 at 6:58

  • Changed state: Invalid

from arduino-new-ping.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.