Nuke the drive subsystem

This commit is contained in:
C4llSqin
2022-10-28 17:21:14 -06:00
parent fe2c7d4ce1
commit 3b0abebabd
4 changed files with 0 additions and 135 deletions
-31
View File
@@ -36,36 +36,5 @@ public class RobotMap {
}
/* Drive Subsystem */
public final WPI_TalonFX leftFrontMotor = new WPI_TalonFX(DriveConstants.DRIVE_LEFT_FRONT_CAN_ID);
public final WPI_TalonFX rightFrontMotor = new WPI_TalonFX(DriveConstants.DRIVE_RIGHT_FRONT_CAN_ID);
public final WPI_TalonFX leftBackMotor = new WPI_TalonFX(DriveConstants.DRIVE_LEFT_BACK_CAN_ID);
public final WPI_TalonFX rightBackMotor = new WPI_TalonFX(DriveConstants.DRIVE_RIGHT_BACK_CAN_ID);
public final DifferentialDrive driveTrain = new DifferentialDrive(leftFrontMotor, rightFrontMotor);
public final RobotGyro gyroDrive = new RobotGyro(new PigeonIMU(DriveConstants.DRIVE_PIGEON_ID));
void configureDriveMotorControllers() {
/* factory default values */
leftFrontMotor.configFactoryDefault();
rightFrontMotor.configFactoryDefault();
leftBackMotor.configFactoryDefault();
rightBackMotor.configFactoryDefault();
/* set back motors as followers */
leftBackMotor.follow(leftFrontMotor);
rightBackMotor.follow(rightFrontMotor);
/* set neutral mode */
leftFrontMotor.setNeutralMode(NeutralMode.Brake);
rightFrontMotor.setNeutralMode(NeutralMode.Brake);
leftFrontMotor.setNeutralMode(NeutralMode.Brake);
rightFrontMotor.setNeutralMode(NeutralMode.Brake);
/* flip input so forward becomes back, etc */
leftFrontMotor.setInverted(false);
rightFrontMotor.setInverted(false);
leftBackMotor.setInverted(InvertType.FollowMaster);
rightBackMotor.setInverted(InvertType.FollowMaster);
}
}