]> www.fi.muni.cz Git - bike-lights.git/commitdiff
patterns for testing
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sun, 30 Sep 2012 20:11:43 +0000 (22:11 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sun, 30 Sep 2012 20:11:43 +0000 (22:11 +0200)
firmware/pattern.c

index a39be3657c579a4e4cf8d5a5a65ebb61c729f7f8..989009e6c237b55ebc8e3ba96fa1050753ce8b5d 100644 (file)
@@ -23,9 +23,9 @@ pattern_t blink_pattern[] = {
 };
 
 pattern_t mode1_pattern[] = {
-       { 3, 0x1 },
+       { 4, 0x1 },
        { 0, 0x1 },
-       { 3, 0x1 },
+       { 4, 0x1 },
        { 0, 0x8 },
        { 1, 0x1 },
        { 0, 0x1 },
@@ -124,12 +124,11 @@ 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
-
-       if (n == 2) {
+       else if (n == 2)
                return mode1_pattern;
-       }
-       return number_pattern(1+ambient_zone);
-       // return off_pattern;
+       else if (n == 3)
+               return number_pattern(1+ambient_zone);
+       return off_pattern;
 }
 
 void patterns_next_tick()