Compare commits

..

2 commits

Author SHA1 Message Date
Kai Lauterbach
013cd8a8bf Added a comment 2023-05-12 07:19:03 +02:00
Kai Lauterbach
2714e05173 Fixed typo in calculation 2023-05-12 07:04:25 +02:00

View file

@ -157,12 +157,12 @@ void lightEngine()
//Serial.println("lon: pin" + (String)i + " = PWM(" + (String)tmp_pwm + ")"); //Serial.println("lon: pin" + (String)i + " = PWM(" + (String)tmp_pwm + ")");
analogWrite(pins[i], tmp_pwm); analogWrite(pins[i], tmp_pwm);
} }
} else { } else { // light state is off
if (current_bri[i] != 0) if (current_bri[i] != 0)
{ {
in_transition = true; in_transition = true;
current_bri[i] -= step_level[i] / BRI_MOD_STEPS_PER_SEC; current_bri[i] += step_level[i] / BRI_MOD_STEPS_PER_SEC;
if (current_bri[i] < 0) if (current_bri[i] < 0)
{ {
current_bri[i] = 0; current_bri[i] = 0;