added comments in drive train
This commit is contained in:
parent
bb516ef6c0
commit
525ef9d90d
@ -20,7 +20,7 @@ public class Drivetrain extends SubsystemBase {
|
|||||||
private DifferentialDrive drive;
|
private DifferentialDrive drive;
|
||||||
|
|
||||||
public Drivetrain() {
|
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);
|
leftRear = new VictorSP(DrivetrainConstants.kleftRearPWN);
|
||||||
rightFront = new VictorSP(DrivetrainConstants.kRightfrontPWM);
|
rightFront = new VictorSP(DrivetrainConstants.kRightfrontPWM);
|
||||||
rightRear = new VictorSP(DrivetrainConstants.kRightRearPWM);
|
rightRear = new VictorSP(DrivetrainConstants.kRightRearPWM);
|
||||||
@ -35,13 +35,13 @@ public class Drivetrain extends SubsystemBase {
|
|||||||
|
|
||||||
public Command driveArcade(DoubleSupplier xSpeed, DoubleSupplier zRotation) {
|
public Command driveArcade(DoubleSupplier xSpeed, DoubleSupplier zRotation) {
|
||||||
return run(() -> {
|
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) {
|
public Command driveTank(DoubleSupplier leftspeed, DoubleSupplier rightspeed) {
|
||||||
return run (() -> {
|
return run (() -> {
|
||||||
drive.tankDrive(leftspeed.getAsDouble(), rightspeed.getAsDouble());
|
drive.tankDrive(leftspeed.getAsDouble(), rightspeed.getAsDouble()); //makes tank steering possible
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user