mirror of https://github.com/arendst/Tasmota.git
Allow full power PWM
This commit is contained in:
parent
ae3d7e0122
commit
bdd522c7d2
|
@ -191,6 +191,11 @@ extern void __analogWrite(uint8_t pin, int value)
|
||||||
prep_pwm_steps();
|
prep_pwm_steps();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(value == pwm_range) {
|
||||||
|
digitalWrite(pin, HIGH);
|
||||||
|
prep_pwm_steps();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if((pwm_mask & (1 << pin)) == 0) {
|
if((pwm_mask & (1 << pin)) == 0) {
|
||||||
if(pwm_mask == 0) {
|
if(pwm_mask == 0) {
|
||||||
memset(&_pwm_isr_data, 0, sizeof(_pwm_isr_data));
|
memset(&_pwm_isr_data, 0, sizeof(_pwm_isr_data));
|
||||||
|
|
|
@ -1640,7 +1640,7 @@ void LightAnimate(void)
|
||||||
if (light_type < LT_PWM6) { // only for direct PWM lights, not for Tuya, Armtronix...
|
if (light_type < LT_PWM6) { // only for direct PWM lights, not for Tuya, Armtronix...
|
||||||
for (uint8_t i = 0; i < light_subtype; i++) {
|
for (uint8_t i = 0; i < light_subtype; i++) {
|
||||||
if (pin[GPIO_PWM1 +i] < 99) {
|
if (pin[GPIO_PWM1 +i] < 99) {
|
||||||
if ((cur_col_10bits[i] > 1008) && (cur_col_10bits[i] < 1023) {
|
if ((cur_col_10bits[i] > 1008) && (cur_col_10bits[i] < 1023)) {
|
||||||
cur_col_10bits[i] = 1008; // Fix unwanted blinking and PWM watchdog errors for values close to pwm_range (H801, Arilux and BN-SZ01)
|
cur_col_10bits[i] = 1008; // Fix unwanted blinking and PWM watchdog errors for values close to pwm_range (H801, Arilux and BN-SZ01)
|
||||||
// if (cur_col_10bits[i] > 0xFC*4) {
|
// if (cur_col_10bits[i] > 0xFC*4) {
|
||||||
// cur_col_10bits[i] = 0xFC*4; // Fix unwanted blinking and PWM watchdog errors for values close to pwm_range (H801, Arilux and BN-SZ01)
|
// cur_col_10bits[i] = 0xFC*4; // Fix unwanted blinking and PWM watchdog errors for values close to pwm_range (H801, Arilux and BN-SZ01)
|
||||||
|
|
Loading…
Reference in New Issue