File tree Expand file tree Collapse file tree 3 files changed +3
-14
lines changed
src/main/java/org/frc6423
robot/subsystems/superstructure Expand file tree Collapse file tree 3 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 99import edu .wpi .first .epilogue .Logged ;
1010import edu .wpi .first .math .filter .LinearFilter ;
1111import edu .wpi .first .wpilibj2 .command .Command ;
12- import edu .wpi .first .wpilibj2 .command .Commands ;
1312import edu .wpi .first .wpilibj2 .command .SubsystemBase ;
1413import java .util .function .DoubleSupplier ;
1514
@@ -94,14 +93,7 @@ protected Command runSpeed(double speedRpm) {
9493 * @return {@link Command}
9594 */
9695 protected Command holdSpeed () {
97- return Commands .sequence (
98- this .run (
99- () -> {
100- var currentSpeed = hardware .getSpeedRpm ();
101- hardware .setSpeed (currentSpeed );
102- })
103- .until (() -> true ),
104- this .run (() -> {}));
96+ return runSpeed (() -> hardware .getSpeedRpm ());
10597 }
10698
10799 @ Override
Original file line number Diff line number Diff line change 2323import edu .wpi .first .units .measure .Distance ;
2424import edu .wpi .first .units .measure .MomentOfInertia ;
2525import edu .wpi .first .wpilibj2 .command .Command ;
26- import edu .wpi .first .wpilibj2 .command .Commands ;
2726import edu .wpi .first .wpilibj2 .command .SubsystemBase ;
2827import java .util .function .DoubleSupplier ;
2928import org .frc6423 .robot .Robot ;
@@ -212,7 +211,7 @@ public Command runAngle(double angleRads) {
212211 * @return {@link Command}
213212 */
214213 public Command holdAngle () {
215- return Commands . sequence ( this . runAngle (hardware . getAngleRads ()), this . run (() -> {} ));
214+ return runAngle (() -> hardware . getAngleRads ( ));
216215 }
217216
218217 @ Override
Original file line number Diff line number Diff line change 2222import edu .wpi .first .units .measure .LinearVelocity ;
2323import edu .wpi .first .units .measure .Mass ;
2424import edu .wpi .first .wpilibj2 .command .Command ;
25- import edu .wpi .first .wpilibj2 .command .Commands ;
2625import edu .wpi .first .wpilibj2 .command .SubsystemBase ;
2726import java .util .function .DoubleSupplier ;
2827import org .frc6423 .robot .Robot ;
@@ -233,8 +232,7 @@ public Command runExtension(double extensionMeters) {
233232 * @return {@link Command}
234233 */
235234 public Command holdExtension () {
236- return Commands .sequence (
237- this .runExtension (hardware .getParentPoseMeters ()).until (() -> true ), this .run (() -> {}));
235+ return runExtension (() -> hardware .getParentPoseMeters ());
238236 }
239237
240238 @ Override
You can’t perform that action at this time.
0 commit comments