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) {
|
||||
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());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user