66import choreo .auto .AutoTrajectory ;
77import edu .wpi .first .math .geometry .Pose2d ;
88import edu .wpi .first .math .geometry .Rotation2d ;
9- import edu .wpi .first .wpilibj .DriverStation ;
109import edu .wpi .first .wpilibj .smartdashboard .SmartDashboard ;
1110import edu .wpi .first .wpilibj2 .command .Command ;
1211import edu .wpi .first .wpilibj2 .command .Commands ;
@@ -143,43 +142,6 @@ public AutoRoutine simpleShoot() {
143142 return routine ;
144143 }
145144
146- public AutoRoutine middleShootOnly () {
147- AutoRoutine routine = autoFactory .newRoutine ("middleShootOnly" );
148-
149- routine
150- .active ()
151- .onTrue (
152- Commands .parallel (
153- Commands .sequence (
154- Commands .waitSeconds (1 ),
155- shooter .rawFlywheelCMD (() -> 0.25 ),
156- Commands .waitUntil (
157- () -> {
158- return shooter .atSpeed ();
159- }),
160- // Commands.runOnce(drive::stopWithX),//maybe
161- hopper .shootCMD ())));
162-
163- return routine ;
164- }
165-
166- public AutoRoutine simplerShoot () {
167- AutoRoutine routine = autoFactory .newRoutine ("" );
168-
169- routine
170- .active ()
171- .onTrue (
172- Commands .sequence (
173- Commands .deadline (
174- Commands .waitSeconds (12.5 ),
175- Commands .parallel (
176- shooter .rawFlywheelCMD (() -> 3.2 ),
177- Commands .sequence (Commands .waitSeconds (1 ), hopper .shootCMD ()))),
178- Commands .parallel (Commands .waitSeconds (1 ), shooter .stopCMD (), hopper .stopCMD ())));
179-
180- return routine ;
181- }
182-
183145 public AutoRoutine depotAndClimb (boolean addClimb ) {
184146 AutoRoutine routine = autoFactory .newRoutine ("DepotAndClimb" );
185147
@@ -190,9 +152,8 @@ public AutoRoutine depotAndClimb(boolean addClimb) {
190152 .active ()
191153 .onTrue (
192154 Commands .sequence (
193- sendState ("Auto Started!" ),
194- DriveCommands .autoAlign (drive , collect .getInitialPose ().orElse (drive .getPose ())),
195155 collect .resetOdometry (),
156+ sendState ("Auto Started!" ),
196157 Commands .parallel (collect .cmd (), deploy .deployCMD ())));
197158
198159 collect .atTime ("intake" ).onTrue (Commands .sequence (intake .intakeCMD (), sendState ("Intaking!" )));
@@ -209,11 +170,12 @@ public AutoRoutine depotAndClimb(boolean addClimb) {
209170
210171 if (addClimb ) {
211172 collect
212- .doneDelayed (10 )
173+ .doneDelayed (8 )
213174 .onTrue (
214175 Commands .parallel (
215176 sendState ("Aligning!" ),
216- DriveCommands .autoClimb (drive , climber ),
177+ climb .cmd (),
178+ climber .raiseCMD (),
217179 hopper .stopCMD (),
218180 shooter .stopCMD (),
219181 deploy .undeployCMD ()));
@@ -274,18 +236,4 @@ public AutoRoutine midClimbLeft() {
274236 public AutoRoutine midClimbRight () {
275237 return null ;
276238 }
277-
278- public Command theOnlyAuto () {
279- return Commands .parallel (
280- Commands .sequence (
281- Commands .waitSeconds (1 ),
282- shooter .rawFlywheelCMD (() -> 0.25 ),
283- Commands .waitUntil (
284- () -> {
285- DriverStation .reportWarning ("theonlyauto" , false );
286- return shooter .atSpeed ();
287- }),
288- // Commands.runOnce(drive::stopWithX),//maybe
289- hopper .shootCMD ()));
290- }
291239}
0 commit comments