]> www.fi.muni.cz Git - bike-lights.git/commit
Common patterns rewrite
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 25 Jun 2013 21:41:04 +0000 (23:41 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 26 Jun 2013 20:03:33 +0000 (22:03 +0200)
commitea3a89b1a1e089f72fc7a5a7a9cc9f46cf666faa
tree67f6b67fae363b96f2207f5f6ec3f2f8aa7a0f07
parentcede7e08bdc10f43d0e6c3ef130f6ccac76630df
Common patterns rewrite

slowN_pattern, normalN_pattern, and onN_pattern for N=(1..4)
rewritten to be brightness-independent, and to avoid switching
multiple outputs on at once, if possible.
If not (such as when PWMLED 2 is continuously on), use mode 2 and 3
with the same target current to accomodate for different battery voltages
when more than one output is running.

TODO: actually set brightness based on various conditions, such as
ambient lights, user-requested dim mode, etc.
firmware/buttons.c
firmware/control.c
firmware/lights.h