2 Commits

3 changed files with 12 additions and 12 deletions

View File

@@ -50,9 +50,9 @@ public class Climber extends SubsystemBase {
}
public Command maintainPosition(ClimberPositions position) {
return run(() -> {
targetPosition = position;
return run(() -> {
controller.setSetpoint(
position.getPositionMeters(),
ControlType.kPosition
@@ -61,9 +61,9 @@ public class Climber extends SubsystemBase {
}
public Command manualSpeed(DoubleSupplier speed) {
return run(() -> {
targetPosition = null;
return run(() -> {
motor.set(speed.getAsDouble());
});
}

View File

@@ -60,9 +60,9 @@ public class IntakePivot extends SubsystemBase {
}
public Command maintainPosition(IntakePivotPosition position) {
return run(() -> {
currentTargetPosition = position;
return run(() -> {
if(currentTargetPosition == null) {
leftMotor.disable();
} else {
@@ -72,9 +72,9 @@ public class IntakePivot extends SubsystemBase {
}
public Command manualSpeed(DoubleSupplier speed) {
return run(() -> {
currentTargetPosition = null;
return run(() -> {
leftMotor.set(speed.getAsDouble() * IntakePivotConstants.kMaxManualSpeedMultiplier);
});
}

View File

@@ -80,9 +80,9 @@ public class Shooter extends SubsystemBase {
}
public Command maintainSpeed(ShooterSpeeds speeds) {
return run(() -> {
targetSpeeds = speeds;
return run(() -> {
if(targetSpeeds == null) {
leftMotor.disable();
rightMotor.disable();
@@ -101,9 +101,9 @@ public class Shooter extends SubsystemBase {
}
public Command manualSpeed(DoubleSupplier speed) {
return run(() -> {
targetSpeeds = null;
return run(() -> {
leftMotor.set(speed.getAsDouble() * ShooterConstants.kMaxManualSpeedMultiplier);
rightMotor.set(speed.getAsDouble() * ShooterConstants.kMaxManualSpeedMultiplier);
});