mirror of https://github.com/arendst/Tasmota.git
PCA9685 (driver15) - Allow the "ALL" virtual pin 61 for pwm values
The datasheet shows register 250 is "ALL" pins, which corresponds to virtual pin 61 (61*4+6=250). Pin 61 was already allowed with PWM command for OFF and ON, but not specified pwm values. This update allows virtual pin 61 to be assigned pwm values for all channels. Example usage to set all channels to 2500: `driver15 pwm,61,2500`
This commit is contained in:
parent
2cd510beb9
commit
fd550fd104
|
@ -181,7 +181,7 @@ bool PCA9685_Command(void)
|
||||||
return serviced;
|
return serviced;
|
||||||
}
|
}
|
||||||
uint16_t pwm = atoi(ArgV(argument, 3));
|
uint16_t pwm = atoi(ArgV(argument, 3));
|
||||||
if ((pin >= 0 && pin <= 15) && (pwm >= 0 && pwm <= 4096)) {
|
if ((pin >= 0 && pin <= 15 || pin==61) && (pwm >= 0 && pwm <= 4096)) {
|
||||||
PCA9685_SetPWM(pin, pwm, pca9685_inverted);
|
PCA9685_SetPWM(pin, pwm, pca9685_inverted);
|
||||||
Response_P(PSTR("{\"PCA9685\":{\"PIN\":%i,\"PWM\":%i}}"),pin,pwm);
|
Response_P(PSTR("{\"PCA9685\":{\"PIN\":%i,\"PWM\":%i}}"),pin,pwm);
|
||||||
serviced = true;
|
serviced = true;
|
||||||
|
|
Loading…
Reference in New Issue