@@ -106,7 +106,6 @@ public RobotContainer() {
106106
107107
108108 // Should get called right after subsystems are instantiated
109- addAllProfiledSubsystemsToArray ();
110109
111110
112111 constructorThings ();
@@ -248,28 +247,17 @@ private void registerNamedCommands(){
248247
249248 private Command robotGoToHeightCommandCreator (ElevatorHeight height ){
250249
251- Command command ;
252-
253- boolean elevatorIsAlreadyAtTheBottomAndWeAreTryingToMoveThere = false ;
254- // height == ElevatorHeight.HOME &&
255- // elevator.getCurrentGoal() == ElevatorHeight.HOME;
256250
251+ Command command ;
257252
258- if (elevatorIsAlreadyAtTheBottomAndWeAreTryingToMoveThere ){
259- // Should end immediately
260- command = Commands .sequence (
261- new ElevatorGoToPositionPositionCommand (elevator , height ),
262- new WristGoToPositionCommand (wrist , getEndWristAngleForGivenElevatorHeight (height ))
263- ).withInterruptBehavior (InterruptionBehavior .kCancelSelf );
264- }else {
253+ //INEFFICIENT FOR GETTING FROM CORAL STATION
265254 command = Commands .sequence (
266255 new WristGoToPositionCommand (wrist , WristAngleRad .L2L3 ),
267256 new ElevatorGoToPositionPositionCommand (elevator , height ),
268257 new WristGoToPositionCommand (wrist , getEndWristAngleForGivenElevatorHeight (height ))
269258 ).withInterruptBehavior (InterruptionBehavior .kCancelSelf );
270- }
271-
272259
260+
273261 return command ;
274262
275263 }
@@ -295,49 +283,6 @@ private WristAngleRad getEndWristAngleForGivenElevatorHeight(ElevatorHeight heig
295283 }
296284
297285
298-
299-
300-
301-
302-
303-
304-
305-
306-
307-
308-
309-
310-
311-
312-
313-
314-
315-
316-
317-
318-
319-
320-
321-
322-
323-
324-
325-
326-
327-
328-
329-
330-
331-
332-
333-
334-
335-
336-
337-
338-
339-
340-
341286 // private void testingButtonBindings() {
342287
343288 // configureDriveBindings();
@@ -383,47 +328,11 @@ public Command getAutonomousCommand() {
383328 }
384329
385330
386-
387-
388-
389-
390-
391-
392-
393-
394-
395-
396-
397-
398-
399-
400-
401-
402-
403-
404-
405-
406-
407-
408-
409-
410-
411-
412-
413-
414- private void addAllProfiledSubsystemsToArray (){
415- subsystems = new IProfiledReset []{
416- wrist ,
417- manipulator ,
418- elevator
419- };
420- }
421-
422331 // Should get called in teleopInit, and maybe autonomousInit
423332 public void ResetProfiledSubsystemsOnEnable (){
424- for ( IProfiledReset sub : subsystems ) {
425- sub .ProfileReset ();
426- }
333+ wrist . ProfileReset ();
334+ elevator .ProfileReset ();
335+ manipulator . ProfileReset ();
427336 }
428337
429338
0 commit comments