fixed weird 255 max
This commit is contained in:
@@ -169,8 +169,8 @@ func (p *PCA9685) setPwmFreq(freqHz float32) {
|
||||
}
|
||||
|
||||
func (p *PCA9685) setAllPwm(on int, off int) {
|
||||
onB := byte(on) & BYTE
|
||||
offB := byte(off) & BYTE
|
||||
onB := byte(on)
|
||||
offB := byte(off)
|
||||
|
||||
p.i2cBus.WriteReg(ALL_LED_ON_L, []byte{onB & BYTE})
|
||||
p.i2cBus.WriteReg(ALL_LED_ON_H, []byte{onB & BYTE})
|
||||
@@ -179,8 +179,8 @@ func (p *PCA9685) setAllPwm(on int, off int) {
|
||||
}
|
||||
|
||||
func (p *PCA9685) setPwm(pwm int, on int, off int) {
|
||||
onB := byte(on) & BYTE
|
||||
offB := byte(off) & BYTE
|
||||
onB := byte(on)
|
||||
offB := byte(off)
|
||||
|
||||
p.i2cBus.WriteReg(LED0_ON_L+byte(4)*byte(pwm), []byte{onB & BYTE})
|
||||
p.i2cBus.WriteReg(LED0_ON_H+byte(4)*byte(pwm), []byte{onB >> 8})
|
||||
|
Reference in New Issue
Block a user