]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/pattern.c
pattern.c: start numeric pattern with pause
[bike-lights.git] / firmware / pattern.c
index 989009e6c237b55ebc8e3ba96fa1050753ce8b5d..78f988034fad04bfe0432aeac18d0a566f23c31c 100644 (file)
@@ -55,24 +55,25 @@ pattern_t boot_pattern[] = {
 };
 
 pattern_t pattern_num[] = {
+       { 0, 0x5 },
        { 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
@@ -117,7 +118,7 @@ static pattern_t *number_pattern(unsigned char num)
                num = 9;
 
        return pattern_num + sizeof(pattern_num)/sizeof(pattern_t)
-               - 1 - 2*num;
+               - 2 - 2*num;
 }
 
 static inline pattern_t *pattern_select(unsigned char n)