MRMS
|
#include <mrm-board.h>
Public Member Functions | |
MotorGroupDifferential (Robot *robot, MotorBoard *motorBoardForLeft1, uint8_t motorNumberForLeft1, MotorBoard *motorBoardForRight1, uint8_t motorNumberForRight1, MotorBoard *motorBoardForLeft2=NULL, uint8_t motorNumberForLeft2=0, MotorBoard *motorBoardForRight2=NULL, uint8_t motorNumberForRight2=0) | |
void | go (int16_t leftSpeed=0, int16_t rightSpeed=0, int16_t lateralSpeedToRight=0, uint8_t speedLimit=127) |
![]() | |
MotorGroup (Robot *robot) | |
void | stop () |
Additional Inherited Members | |
![]() | |
float | angleNormalized (float angle) |
![]() | |
MotorBoard * | motorBoard [MAX_MOTORS_IN_GROUP] = { NULL, NULL, NULL, NULL } |
uint8_t | motorNumber [MAX_MOTORS_IN_GROUP] |
Robot * | robotContainer |
Motor group for tank-like propulsion.
MotorGroupDifferential::MotorGroupDifferential | ( | Robot * | robot, |
MotorBoard * | motorBoardForLeft1, | ||
uint8_t | motorNumberForLeft1, | ||
MotorBoard * | motorBoardForRight1, | ||
uint8_t | motorNumberForRight1, | ||
MotorBoard * | motorBoardForLeft2 = NULL , |
||
uint8_t | motorNumberForLeft2 = 0 , |
||
MotorBoard * | motorBoardForRight2 = NULL , |
||
uint8_t | motorNumberForRight2 = 0 |
||
) |
Constructor
motorBoardForLeft1 | - Controller for one of the left wheels |
motorNumberForLeft1 | - Controller's output number |
motorBoardForRight1 | - Controller for one of the right wheels |
motorNumberForRight1 | - Controller's output number |
motorBoardForLeft2 | - Controller for one of the left wheels |
motorNumberForLeft2 | - Controller's output number |
motorBoardForRight2 | - Controller for one of the right wheels |
motorNumberForRight2 | - Controller's output number |
void MotorGroupDifferential::go | ( | int16_t | leftSpeed = 0 , |
int16_t | rightSpeed = 0 , |
||
int16_t | lateralSpeedToRight = 0 , |
||
uint8_t | speedLimit = 127 |
||
) |
Start all motors
leftSpeed,in | range -127 to 127 |
right | Speed, in range -127 to 127 |
speedLimit | - Speed limit, 0 to 127. For example, 80 will limit all the speeds to 80/127%. 0 will turn the motors off. |