Compare commits
2 Commits
96fb68cb32
...
db443cfe63
| Author | SHA1 | Date | |
|---|---|---|---|
| db443cfe63 | |||
| cbcfc9cab0 |
@@ -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());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user