From: Jan "Yenya" Kasprzak Date: Tue, 28 May 2013 20:45:56 +0000 (+0200) Subject: buttons.c: handle brake sensor failure gracefully X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=67fee443a9e9465923ad7e7704eb9000cba49cdd;hp=67fee443a9e9465923ad7e7704eb9000cba49cdd;p=bike-lights.git 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. ---