uyvli
Fork of PololuQik2 by
Diff: PololuQik2.cpp
- Revision:
- 2:25c41766d768
- Parent:
- 1:df9964aaa00d
- Child:
- 4:33ca85c52dc0
diff -r df9964aaa00d -r 25c41766d768 PololuQik2.cpp --- a/PololuQik2.cpp Fri Mar 21 22:19:23 2014 +0000 +++ b/PololuQik2.cpp Tue Apr 01 20:22:30 2014 +0000 @@ -79,9 +79,11 @@ } } -void PololuQik2::stopBothMotors() { - setMotor0Speed(1); - setMotor1Speed(1); +void PololuQik2::stopBothMotors(int8_t speed) { + unsigned char message[] = {MOTOR0COASTPACKET, speed}; + sendMessage(message , 2); + unsigned char message2[] = {MOTOR1COASTPACKET, speed}; + sendMessage(message2 , 2); } void PololuQik2::sendMessage(unsigned char message[], uint8_t length) {