X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=firmware%2Fpattern.c;h=3aec77b947bec7b52edea8f6b1cd470504a54b66;hb=5160421f0d1725356e74a24b334e68eaaa9b398c;hp=d3e097740249474921fc3c55b53b38a9cd5ca018;hpb=926be135a0c8184c17ad39ae0dff55ea6e00c50e;p=bike-lights.git diff --git a/firmware/pattern.c b/firmware/pattern.c index d3e0977..3aec77b 100644 --- a/firmware/pattern.c +++ b/firmware/pattern.c @@ -25,9 +25,9 @@ pattern_t blink_pattern[] = { }; pattern_t mode1_pattern[] = { - { 4, 0x1 }, + { 2, 0x1 }, { 0, 0x1 }, - { 4, 0x1 }, + { 2, 0x1 }, { 0, 0x8 }, { 1, 0x1 }, { 0, 0x1 }, @@ -102,7 +102,7 @@ void led_set_pattern(unsigned char n, pattern_t *pattern) led_set_mode(n, pattern->mode); } -void pattern_init() +void init_pattern() { unsigned char i; @@ -124,9 +124,7 @@ pattern_t *number_pattern(unsigned char num) static inline pattern_t *pattern_select(unsigned char n) { - if (n < N_PWMLEDS && !pwmled_enabled(n)) - return off_pattern; // Don't mess with non-enabled LEDs - else if (n < N_PWMLEDS) + if (n < N_PWMLEDS) return mode1_pattern; else if (n == 3) return status_pattern_select(0);