- /*
- * @param left and right setpoints to set to the left and right side of tank
- * inverted is for Logan, wants the robot to invert all controls left = right
- * and right = left negative input is required for the regular rotation
- * because RobotDrive tankdrive method drives inverted
- */
- public void drive(double left, double right) {
- robotDrive.tankDrive(-left, -right);
+ public void joystickDrive(double left, double right) {
+ int type = Constants.DriveTrain.DRIVE_TYPE;
+ double k = (isFlipped() ? -1 : 1);
+ if (type == Constants.DriveTrain.TANK_DRIVE) {
+ robotDrive.tankDrive(-left * k, -right * k);
+ } else if (type == Constants.DriveTrain.ARCADE_DRIVE) {
+ robotDrive.arcadeDrive(left * k, right);
+ }