Quote:
Originally Posted by ekovacs
This is what my team has done for the last few years now. It can be done with one line of code that is built in to the RobotDrive class in wpilib.
Code:
yourRobotDriveobject.ArcadeDrive(joystick.getRawAxis(forwardaxis), joystick.getRawAxis(rotateaxis));
|
Quote:
Originally Posted by thatprogrammer
While that method should work for a single joystick, it doesn't appear to work if using 2 stick arcade or Kaj drive. Any idea if changing arcade drive in the robotdrive header file could fix this?
|
ekovacs example above is using the following form of ArcadeDrive.
Code:
void ArcadeDrive(float moveValue, float rotateValue, bool squaredInputs = true);
It doesn't matter where the moveValue and rotateValue come from. You could read from a second joystick, or a sensor, or anything else.