uyvli
Fork of PololuQik2 by
Diff: PololuQik2.h
- Revision:
- 4:33ca85c52dc0
- Parent:
- 3:01272a06e922
diff -r 01272a06e922 -r 33ca85c52dc0 PololuQik2.h --- a/PololuQik2.h Sat Apr 05 07:25:28 2014 +0000 +++ b/PololuQik2.h Sat Apr 12 20:25:58 2014 +0000 @@ -48,6 +48,9 @@ #define MOTOR1COASTPACKET 0x87 /**< The packet used to all motor 1 to coast */ #define FWVERSIONPACKET 0x81 /**< The packet to query the firmware version of the motor controller */ #define ERRORPACKET 0x82 /**< The packet to request the error state from the motor controller */ +#define MOTOR0CURRENTPACKET 0x90 +#define MOTOR1CURRENTPACKET 0x91 + #define DATAOVERRUNERRORBIT 3 /**< The bit which signifies a data over run error */ #define FRAMEERRORBIT 4 /**< The bit which signifies a frame error */ @@ -84,6 +87,10 @@ */ PololuQik2::PololuQik2(PinName TxPin, PinName RxPin, PinName RSTPin, PinName errPin, void (*errorFunction)(void), bool enCRC); + // get current + uint8_t PololuQik2::GetMotor0Current(); + uint8_t PololuQik2::GetMotor1Current(); + // /** * This method initialises and begins communication with the motor controller. * This method is also called when an error is exhibited.