From: Jan "Yenya" Kasprzak Date: Mon, 3 Jun 2013 20:04:33 +0000 (+0200) Subject: pwmled.c: start probing with non-zero PWM value X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=6737fabc05aa6e7975d4fd47ad0f4a2128124351;p=bike-lights.git pwmled.c: start probing with non-zero PWM value ... in order to kick the ADCs on. --- diff --git a/firmware/pwmled.c b/firmware/pwmled.c index 9aa6d80..db1cb86 100644 --- a/firmware/pwmled.c +++ b/firmware/pwmled.c @@ -94,10 +94,11 @@ void init_pwmled() pwmled_t *led = pwmleds + i; led->err_sum = 0; led->target = adc_vals[i*N_PWMLED_MODES]; - led->pwm = 0; led->mode = 1; - led->state = ST_PROBING; led->probe_steady = 0; + led->state = ST_PROBING; + led->pwm = 1; + pwm_set(i, led->pwm); for (j = 0; j < N_PWMLED_MODES; j++) { led->mode_pwm[j] = 0;