]> www.fi.muni.cz Git - bike-lights.git/commitdiff
pwmled.c: shut down the boost converter later
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 20 Feb 2013 21:47:24 +0000 (22:47 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 20 Feb 2013 21:49:01 +0000 (22:49 +0100)
firmware/pwmled.c

index 70cbcf1429ca6d71bc0c6d432111d9ae72bbeca3..99650d00460aeff816954cb66ff13da2e1c86f48 100644 (file)
@@ -227,7 +227,7 @@ void pwmled_adc(unsigned char n, uint16_t adcval)
        led->err_sum = sum;
 
        if (led->pwm >= PWM_MAX
-               || (n == 1 && led->pwm > PWM_MAX/4 && adcval < 0x08)) {
+               || (n == 1 && led->pwm > PWM_MAX/2 && adcval < 0x08)) {
                pwmled_err(n);
                return;
        }