Skip to content

Commit

Permalink
Task 2 Completion
Browse files Browse the repository at this point in the history
  • Loading branch information
InfinityJuice committed Oct 12, 2024
1 parent 56a0d41 commit 390e8bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/frc/robot/subsystems/XRPDrivetrain.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 390e8bb

Please sign in to comment.