Quote:
Originally Posted by EHaskins
The WPILib "RobotDrive" class includes the ability to easily reverse motors in software. Normally this would be configured using a call to SetInvertedMotor().
WPILib code a docs:
Code:
/*
* Invert a motor direction.
* This is used when a motor should run in the opposite direction as the drive
* code would normally run it. Motors that are direct drive would be inverted, the
* Drive code assumes that the motors are geared with one reversal.
* @param motor The motor index to invert.
* @param isInverted True if the motor should be inverted when operated.
*/
void RobotDrive::SetInvertedMotor(MotorType motor, bool isInverted)
{
...
}
The OTB code probably was configured to reverse one side, since that is almost always desired for a robot drive.
|
Thank you. This was most useful.