Skip to content

Commit adc9d51

Browse files
Didn't realise the driving part was in DrivetrainCommand
1 parent 8dd2d2a commit adc9d51

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/main/java/frc/robot/Commands/DrivetrainCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public static enum Position {
3535
.withDriveRequestType(
3636
SwerveModule.DriveRequestType
3737
.OpenLoopVoltage); // Use open-loop control for drive motors
38+
public static final double DEADBAND = 0.05;
3839

3940
public DrivetrainCommand(
4041
CommandSwerveDrivetrain subsystem,

src/main/java/frc/robot/RobotContainer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ private void configureBindings() {
4545

4646
// Drivetrain Teleop drive with controller inputs
4747
drivetrain.setDefaultCommand(
48-
drivetrain.applyRequest(
49-
() ->
50-
drive
51-
.withVelocityX(-controller.getLeftY() * MaxSpeed)
52-
.withVelocityY(-controller.getLeftX() * MaxSpeed)
53-
.withRotationalRate(-controller.getRightX() * MaxAngularRate)));
48+
new DrivetrainCommand(
49+
drivetrain,
50+
DrivetrainCommand.Position.TELEOP,
51+
controller.getLeftX(),
52+
controller.getLeftY(),
53+
controller.getRightX()));
5454

5555
// Buttons
5656

src/main/java/frc/robot/config/ControllerConfig.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)