From dce798d0d68b014d538406085a6fb761f9393559 Mon Sep 17 00:00:00 2001 From: "Jan \"Yenya\" Kasprzak" Date: Wed, 26 Jun 2013 23:48:54 +0200 Subject: [PATCH] control.c: test pattern for debugging pwmleds --- firmware/control.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; -- 2.43.5