]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/pattern.c
pattern.c: remove unused function
[bike-lights.git] / firmware / pattern.c
index a11999d66e152198b7c160a0d1f84cd4274ba2b4..feddbb69ed965841e03deabb97a17d1dcbfc9b64 100644 (file)
@@ -108,7 +108,7 @@ void pattern_init()
        test_running = 0;
 }
 
-static pattern_t *number_pattern(unsigned char num)
+pattern_t *number_pattern(unsigned char num)
 {
        if (num >= 9)
                num = 9;
@@ -121,10 +121,12 @@ 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 == 2)
+       else if (n < N_PWMLEDS)
                return mode1_pattern;
        else if (n == 3)
-               return number_pattern(1+ambient_zone);
+               return status_pattern_select(0);
+       else if (n == 4)
+               return status_pattern_select(1);
        return off_pattern;
 }
 
@@ -147,7 +149,3 @@ void patterns_next_tick()
        }
 }
 
-void led_set_status(unsigned char status)
-{
-       led_set_pattern(N_PWMLEDS+1, number_pattern(status));
-}