added comments in drive train

This commit is contained in:
Cayden 2024-10-17 17:51:25 -04:00
parent bb516ef6c0
commit 525ef9d90d

View File

@ -20,7 +20,7 @@ public class Drivetrain extends SubsystemBase {
private DifferentialDrive drive;
public Drivetrain() {
leftFront = new VictorSP(DrivetrainConstants.kleftFrontPWN);
leftFront = new VictorSP(DrivetrainConstants.kleftFrontPWN); //turns the code inputs (like how fast or how to turn) and make it a way that the motors will understand.
leftRear = new VictorSP(DrivetrainConstants.kleftRearPWN);
rightFront = new VictorSP(DrivetrainConstants.kRightfrontPWM);
rightRear = new VictorSP(DrivetrainConstants.kRightRearPWM);
@ -35,13 +35,13 @@ public class Drivetrain extends SubsystemBase {
public Command driveArcade(DoubleSupplier xSpeed, DoubleSupplier zRotation) {
return run(() -> {
drive.arcadeDrive(xSpeed.getAsDouble(), zRotation.getAsDouble());
drive.arcadeDrive(xSpeed.getAsDouble(), zRotation.getAsDouble()); //makes car like steering possible
});
}
public Command driveTank(DoubleSupplier leftspeed, DoubleSupplier rightspeed) {
return run (() -> {
drive.tankDrive(leftspeed.getAsDouble(), rightspeed.getAsDouble());
drive.tankDrive(leftspeed.getAsDouble(), rightspeed.getAsDouble()); //makes tank steering possible
});
}