]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/pattern.c
adc.c: abort the current reading when the timer expires
[bike-lights.git] / firmware / pattern.c
index c9f4ded4ef230142fc77adecf7669ade8ec1074a..83a932e2e0abc21b5fb075920b985bfeff7bf4f8 100644 (file)
@@ -110,9 +110,8 @@ void pwmleds_update_mode()
        mode1 = (mode >> 2) & 1;
        mode2 = (mode >> 3) & 3;
 
-       if (braking) {
-               if (!mode0)
-                       mode0 = 2;
+       if (braking && !battery_critical) {
+               mode0 = 2;
                if (mode2 == 2)
                        mode2 = 3;
        }