From: Jan "Yenya" Kasprzak Date: Wed, 26 Jun 2013 21:48:54 +0000 (+0200) Subject: control.c: test pattern for debugging pwmleds X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=dce798d0d68b014d538406085a6fb761f9393559;p=bike-lights.git control.c: test pattern for debugging pwmleds --- diff --git a/firmware/control.c b/firmware/control.c index 8477722..9b35699 100644 --- a/firmware/control.c +++ b/firmware/control.c @@ -64,6 +64,17 @@ pattern_t on_pattern[] = { PATTERN_END }; +// #define TEST_PATTERN 1 +#ifdef TEST_PATTERN +pattern_t test_pattern[] = { + { PWM_PAT(1, 0, 0), D_13 }, + { PWM_PAT(2, 0, 0), D_13 }, + { PWM_PAT(0, 0, 1), D_13 }, + { PWM_PAT(0, 0, 2), D_13 }, + PATTERN_END +}; +#endif + volatile unsigned char braking; static unsigned char dim_mode, towbar_mode; @@ -104,6 +115,9 @@ void set_panic_mode() pattern_t *pwmled_pattern_select() { +#ifdef TEST_PATTERN + return tmp_pattern; +#endif if (battery_critical) return slow_pattern;