diff --git a/src/main/java/frc/robot/subsystems/XRPDrivetrain.java b/src/main/java/frc/robot/subsystems/XRPDrivetrain.java index 1f7f69c..27410e4 100644 --- a/src/main/java/frc/robot/subsystems/XRPDrivetrain.java +++ b/src/main/java/frc/robot/subsystems/XRPDrivetrain.java @@ -8,6 +8,7 @@ import edu.wpi.first.wpilibj.drive.DifferentialDrive; import edu.wpi.first.wpilibj.xrp.XRPMotor; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.commands.DriveCommands; public class XRPDrivetrain extends SubsystemBase { private static final double kGearRatio = @@ -48,7 +49,11 @@ public void arcadeDrive(double xaxisSpeed, double zaxisRotate) { //TODO:Task 2-Write a function that makes the robot take in a left wheel speed and a right wheel speed, and move at those speeds. //HINT:This is called a tank drive, maybe there is a function that can easily allow for it? //HINT:To see all the functions that the drivetrain has, type "m_diffDrive." without the quotes and look at the options generated by auto complete. + public void tankDrive(double left_speed, double right_speed) { + m_diffDrive.tankDrive(left_speed,right_speed); + } + public void resetEncoders() { m_leftEncoder.reset(); m_rightEncoder.reset();