Update xdrv_04_light.ino

This commit is contained in:
stefanbode 2020-07-07 16:19:26 +02:00 committed by GitHub
parent f2e686ab26
commit debd2b7562
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2185,7 +2185,9 @@ void LightSetOutputs(const uint16_t *cur_col_10) {
if (!isChannelCT(i)) { // if CT don't use pwm_min and pwm_max
cur_col = cur_col > 0 ? changeUIntScale(cur_col, 0, Settings.pwm_range, Light.pwm_min, Light.pwm_max) : 0; // shrink to the range of pwm_min..pwm_max
}
analogWrite(Pin(GPIO_PWM1, i), bitRead(pwm_inverted, i) ? Settings.pwm_range - cur_col : cur_col);
if (!Settings.flag4.zerocross_dimmer) {
analogWrite(Pin(GPIO_PWM1, i), bitRead(pwm_inverted, i) ? Settings.pwm_range - cur_col : cur_col);
}
}
}
}