Skip to content

Commit

Permalink
Fix drive command
Browse files Browse the repository at this point in the history
  • Loading branch information
BenG49 committed Jan 12, 2024
1 parent 6f48640 commit 63f08ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/stuypulse/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class RobotContainer {

// Subsystem
public final AbstractDrivetrain drivetrain = AbstractDrivetrain.getInstance();
public final Launcher launcher = Launcher.getInstance();
// public final Launcher launcher = Launcher.getInstance();
//public final AbstractOdometry odometry = AbstractOdometry.getInstance();
//public final AbstractVision vision = AbstractVision.getInstance();

Expand All @@ -54,7 +54,6 @@ public RobotContainer() {

private void configureDefaultCommands() {
drivetrain.setDefaultCommand(new DrivetrainDrive(driver));
//drivetrain.setDefaultCommand(new DriveDrive(drivetrain, driver));
}

/***************/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

public class DrivetrainDrive extends Command {
public final AbstractDrivetrain drivetrain;
private final Gamepad driver;

double rightSpeed;
double leftSpeed;
Expand All @@ -19,7 +18,6 @@ public class DrivetrainDrive extends Command {

public DrivetrainDrive(Gamepad driver) {
this.drivetrain = AbstractDrivetrain.getInstance();
this.driver = driver;

this.speed = IStream.create(
() -> driver.getRightY() - driver.getLeftY())
Expand All @@ -41,8 +39,6 @@ public DrivetrainDrive(Gamepad driver) {

@Override
public void execute() {
if (driver.getRawLeftButton() || driver.getRawRightButton()) {
drivetrain.arcadeDrive(speed.get(), angle.get());
}
drivetrain.arcadeDrive(speed.get(), angle.get());
}
}

0 comments on commit 63f08ce

Please sign in to comment.