From e5a713fadbd0960fc64bd76cc2dfa5f272acbb82 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Tue, 12 Dec 2017 23:33:32 +0100 Subject: [PATCH] fixed max pulse check --- pca9685.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pca9685.go b/pca9685.go index c07b5af..abc2e8f 100644 --- a/pca9685.go +++ b/pca9685.go @@ -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)) }