Partially adjusting drivetrain code to resolve an obvious error

This commit is contained in:
2026-01-28 20:32:10 -05:00
parent 436667d0e4
commit 4296e2f27f
2 changed files with 5 additions and 5 deletions

View File

@@ -43,8 +43,8 @@ public class RobotContainer {
private void configureBindings() { private void configureBindings() {
drivetrain.setDefaultCommand( drivetrain.setDefaultCommand(
drivetrain.drive( drivetrain.drive(
driver::getLeftY,
driver::getLeftX, driver::getLeftX,
driver::getLeftY,
driver::getRightX, driver::getRightX,
() -> true () -> true
) )

View File

@@ -180,12 +180,12 @@ public class Drivetrain extends SubsystemBase {
} }
public Command drive(DoubleSupplier xSpeed, DoubleSupplier ySpeed, DoubleSupplier rotation, BooleanSupplier fieldRelative) { public Command drive(DoubleSupplier xSpeed, DoubleSupplier ySpeed, DoubleSupplier rotation, BooleanSupplier fieldRelative) {
// TODO Inversions? Specific Alliance code? // TODO Specific Alliance code?
return run(() -> { return run(() -> {
drive( drive(
MathUtil.applyDeadband(xSpeed.getAsDouble(), OIConstants.kDriveDeadband), -MathUtil.applyDeadband(xSpeed.getAsDouble(), OIConstants.kDriveDeadband),
MathUtil.applyDeadband(ySpeed.getAsDouble(), OIConstants.kDriveDeadband), -MathUtil.applyDeadband(ySpeed.getAsDouble(), OIConstants.kDriveDeadband),
MathUtil.applyDeadband(rotation.getAsDouble(), OIConstants.kDriveDeadband), -MathUtil.applyDeadband(rotation.getAsDouble(), OIConstants.kDriveDeadband),
fieldRelative.getAsBoolean() fieldRelative.getAsBoolean()
); );
}); });