]> www.fi.muni.cz Git - bike-lights.git/blobdiff - firmware/pwmled.c
pwmled: faster regulation
[bike-lights.git] / 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;