]> www.fi.muni.cz Git - openparking.git/commit
Maximum distance is not an error
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sat, 23 May 2015 15:28:06 +0000 (17:28 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sat, 23 May 2015 15:50:27 +0000 (17:50 +0200)
commit0c9ed6a110149013fd3690338fac0b33f760e0ed
tree0eb2278e812f5025b7995cd9fb9ba5d5d4f7bd3b
parent0bbaad8dc171999d4aeabae9b5b222364f066388
Maximum distance is not an error

Try to handle the too-distant object gracefully - treat them as if the
pulse ended at the ECHO_TIMEOUT time.

Now -1 means error (the echo pulse has not started), while too long
value is simply recorded as maximum value.
firmware/firmware.c