]> www.fi.muni.cz Git - bike-lights.git/commitdiff
pwmled: faster regulation
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 25 Jun 2013 20:17:45 +0000 (22:17 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 26 Jun 2013 09:10:11 +0000 (11:10 +0200)
firmware/pwmled.c

index bf376eea98aeb71357effc5e19ac9902eef351e0..3456e95e7d57c03160480a2985a14738a3190ab6 100644 (file)
@@ -225,7 +225,8 @@ void pwmled_adc(unsigned char n, uint16_t adcval)
 
        old_pwm = led->pwm;
 
-       shift = led->state == ST_PROBING ? 3 : 8;
+       // shift = led->state == ST_PROBING ? 3 : 8;
+       shift = 3;
 
        sum = ((int32_t)led->pwm << shift)
                + led->err_sum + led->target - adcval;