From: Jan "Yenya" Kasprzak Date: Tue, 25 Jun 2013 21:41:04 +0000 (+0200) Subject: Common patterns rewrite X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=ea3a89b1a1e089f72fc7a5a7a9cc9f46cf666faa;hp=ea3a89b1a1e089f72fc7a5a7a9cc9f46cf666faa;p=bike-lights.git 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. ---