View Single Post
  #8   Spotlight this post!  
Unread 20-01-2009, 16:34
FRC1672's Avatar
FRC1672 FRC1672 is offline
Team 1672
FRC #1672 (Mahwah Robo T-Birds)
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Mahwah
Posts: 29
FRC1672 is on a distinguished road
Re: Problem with Motor direction

Quote:
Originally Posted by EHaskins View Post
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.