Partially adjusting drivetrain code to resolve an obvious error
This commit is contained in:
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user