frc2019.robot.subsystems.DriveTrain

Subsystem for the drive train. The drive train consists of four omni wheels. Can be switched between arcade and tank drive.

Commands

public DriveTrain()

Constructor for DriveTrain

Motors are brushless.

All motors are set to Brake Mode.

Limit switches are normally open.

TODO: Figure out hashmaps and why they are needed here.

public void initDefaultCommand()

Associates the Drive command with the subsystem DriveTrain.

public void tankDrive(double l, double r)

Drives the robot in tank drive. Right joystick controls right side, left controls left.

public void arcadeDrive(double y, double r)

Drives the robot in arcade drive. Right joystick controls turning, left controls forward and backward.

TODO: Confirm that it’s left and right that does the corresponding things.

private void gyroDrive(double y, double r)

Currently not being used. Just does arcade drive.

TODO: Read through the commented code and figure out what it originally did?

private boolean goingStraight(double y, double r)

Checks whether or not the robot is going straight.

private void toggleGyro()

Toggles whether the gyro is being used or not.

private void toggleMode()

Changes which drive mode you are using: arcade or tank.