]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/pattern.c
patterns for testing
[bike-lights.git] / firmware / pattern.c
index fb74ae0204426579429c39a59af78d97ef9f34f4..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,11 +124,10 @@ 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);
+       else if (n == 3)
+               return number_pattern(1+ambient_zone);
        return off_pattern;
 }