Placement of where a value was set was wrong

This commit is contained in:
2026-03-01 16:36:06 -05:00
parent 80ef3a3431
commit cbcfc9cab0
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) { public Command maintainPosition(ClimberPositions position) {
return run(() -> {
targetPosition = position; targetPosition = position;
return run(() -> {
controller.setSetpoint( controller.setSetpoint(
position.getPositionMeters(), position.getPositionMeters(),
ControlType.kPosition ControlType.kPosition
@@ -61,9 +61,9 @@ public class Climber extends SubsystemBase {
} }
public Command manualSpeed(DoubleSupplier speed) { public Command manualSpeed(DoubleSupplier speed) {
return run(() -> {
targetPosition = null; targetPosition = null;
return run(() -> {
motor.set(speed.getAsDouble()); motor.set(speed.getAsDouble());
}); });
} }

View File

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

View File

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