From fbc25182bf8a572dcab7ae3489e2dc168b901e69 Mon Sep 17 00:00:00 2001 From: "Jan \"Yenya\" Kasprzak" Date: Thu, 28 Mar 2013 23:55:02 +0100 Subject: [PATCH] pwmled.c: slower response in order to gain stability --- firmware/pwmled.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/pwmled.c b/firmware/pwmled.c index 7be95e1..8e86b4f 100644 --- a/firmware/pwmled.c +++ b/firmware/pwmled.c @@ -56,7 +56,7 @@ static uint16_t adc_vals[N_PWMLEDS*N_PWMLED_MODES] = { MA_GAIN_TO_ADC( 20, 20), /* pwmled2 */ MA_GAIN_TO_ADC( 50, 1), - MA_GAIN_TO_ADC( 100, 1), + MA_GAIN_TO_ADC( 80, 1), MA_GAIN_TO_ADC( 150, 1), MA_GAIN_TO_ADC( 200, 1) #else @@ -214,7 +214,7 @@ void pwmled_adc(unsigned char n, uint16_t adcval) old_pwm = led->pwm; - shift = led->state == ST_PROBING ? 3 : 5; + shift = led->state == ST_PROBING ? 3 : 8; sum = ((int32_t)led->pwm << shift) + led->err_sum + led->target - adcval; -- 2.43.5