]> www.fi.muni.cz Git - bike-lights.git/commit
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)
commit67fee443a9e9465923ad7e7704eb9000cba49cdd
treee7445973aa1a35b36b29d0607258b94a15f755d3
parentb1cfa25b137d2d9d2b23354982e4632ab6e60b5c
buttons.c: handle brake sensor failure gracefully

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.
firmware/buttons.c