]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/pattern.c
pattern.c: another attempt at brake handling
[bike-lights.git] / firmware / pattern.c
index e7a8a09314c8a9a57c8c3a29c726c5893afddd01..83a932e2e0abc21b5fb075920b985bfeff7bf4f8 100644 (file)
@@ -111,13 +111,9 @@ void pwmleds_update_mode()
        mode2 = (mode >> 3) & 3;
 
        if (braking && !battery_critical) {
-               if (mode0) {
-                       mode0 = 2;
-                       if (mode2 == 2)
-                               mode2 = 3;
-               } else {
-                       mode0 = 1;
-               }
+               mode0 = 2;
+               if (mode2 == 2)
+                       mode2 = 3;
        }
 
        pwmled_set_mode(0, mode0);