]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/pattern.c
num_pattern: longer delay
[bike-lights.git] / firmware / pattern.c
index a39be3657c579a4e4cf8d5a5a65ebb61c729f7f8..fa885cbb97bbdda10483a55f7d6bdce734a4c805 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 },
@@ -56,23 +56,23 @@ pattern_t boot_pattern[] = {
 
 pattern_t pattern_num[] = {
        { 1, 0x1 }, /* 10 */
-       { 0, 0x4 },
+       { 0, 0x5 },
        { 1, 0x1 }, /*  9 */
-       { 0, 0x4 },
+       { 0, 0x5 },
        { 1, 0x1 }, /*  8 */
-       { 0, 0x4 },
+       { 0, 0x5 },
        { 1, 0x1 }, /*  7 */
-       { 0, 0x4 },
+       { 0, 0x5 },
        { 1, 0x1 }, /*  6 */
-       { 0, 0x4 },
+       { 0, 0x5 },
        { 1, 0x1 }, /*  5 */
-       { 0, 0x4 },
+       { 0, 0x5 },
        { 1, 0x1 }, /*  4 */
-       { 0, 0x4 },
+       { 0, 0x5 },
        { 1, 0x1 }, /*  3 */
-       { 0, 0x4 },
+       { 0, 0x5 },
        { 1, 0x1 }, /*  2 */
-       { 0, 0x4 },
+       { 0, 0x5 },
        { 1, 0x1 }, /*  1 */
        { 0, 0x1F },
        PATTERN_END
@@ -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()