fixed max pulse check

This commit is contained in:
2017-12-12 23:33:32 +01:00
parent 71400d7128
commit e5a713fadb

View File

@@ -189,7 +189,7 @@ func (p *PCA9685) setPwm(pwm int, on uint16, off uint16) {
}
func (pwm *Pwm) setPercentage(percentage float32) error {
if percentage < 0.0 || percentage > 100.0 || pwm.pca.maxPulse > 65536 {
if percentage < 0.0 || percentage > 100.0 {
return errors.New(fmt.Sprintf("Percentage must be between 0.0 and 100.0. Got %v.", percentage))
}