Adafruit_CircuitPython_Motor icon indicating copy to clipboard operation
Adafruit_CircuitPython_Motor copied to clipboard

`kit.continuous_servo[1].throttle = None` doesn't work like `kit.servo[1].angle = None`

Open cTurtle98 opened this issue 2 years ago • 2 comments

when I try to use kit.continuous_servo[1].throttle = None I get this error

TypeError: '>' not supported between instances of 'NoneType' and 'float'

cTurtle98 avatar Jun 02 '23 01:06 cTurtle98

Servo handles None here:

https://github.com/adafruit/Adafruit_CircuitPython_Motor/blob/cc5fa11ceb68af5597f6a308fed5d9c8480c32a3/adafruit_motor/servo.py#L131-L135

which passes to BaseServo_ here:

https://github.com/adafruit/Adafruit_CircuitPython_Motor/blob/cc5fa11ceb68af5597f6a308fed5d9c8480c32a3/adafruit_motor/servo.py#L66-L70

and here it is in continious servo

https://github.com/adafruit/Adafruit_CircuitPython_Motor/blob/cc5fa11ceb68af5597f6a308fed5d9c8480c32a3/adafruit_motor/servo.py#L154-L160

but it doesnt work

cTurtle98 avatar Jun 02 '23 01:06 cTurtle98

some context:

I am using servokit continiousservo throttle to drive blue robotics basic esc's https://bluerobotics.com/store/thrusters/speed-controllers/besc30-r3/ from a raspberry pi with the external servo driver board

I am trying to make the motors (connected to the esc) stop spinning and the esc to do its disarmed chime (which releases hold power on the motors)

cTurtle98 avatar Jun 02 '23 01:06 cTurtle98