]> www.fi.muni.cz Git - bike-lights.git/commitdiff
buttons.c: handle brake sensor failure gracefully
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 28 May 2013 20:45:56 +0000 (22:45 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 28 May 2013 20:45:56 +0000 (22:45 +0200)
A common failure mode is that the magnet slips and does not provide
the signal, so it appears as if constantly braking. Avoid this situation
by allowing continuous braking of at most 16 seconds. After that, report
brake off, and wait for the real "brake off" signall from the Hall sensor.


No differences found