Quote:
|
Originally Posted by gnormhurst
Is SONAR_REST a remnant from a previous version? Won't the code get lost if sonar_status is set to SONAR_REST?
|
The code doesn't get lost when the status is set to SONAR_REST. Shortly after the status is set to rest on line 206 the timer is started. In the timer interrupt service routine the status is set to SONAR_OFF. After that occurs, the sonar can be pulsed again with Ping_Sonar(). I found the rest was necessary to allow the sensor to work correctly.
I'm glad you like the software. Please let us know how your testing turns out.