1919import frc .robot .commands .*;
2020import frc .robot .config .CANMappings ;
2121import frc .robot .config .HopperConfig ;
22+ import frc .robot .config .IntakeConfig ;
2223import frc .robot .config .TunerConstants ;
2324import frc .robot .subsystems .*;
2425
@@ -55,6 +56,7 @@ public class RobotContainer {
5556 .withDeadline (Commands .waitSeconds (2 ))));
5657
5758 public RobotContainer () {
59+
5860 NamedCommands .registerCommand (
5961 "idle" ,
6062 Commands .runOnce (() -> hopper .stop (), hopper )
@@ -66,22 +68,31 @@ public RobotContainer() {
6668 Commands .runEnd (
6769 () -> hopper .move (HopperConfig .HOPPER_EXTEND_ROTATION ), () -> hopper .stop (), hopper )
6870 .alongWith (Commands .run (() -> System .out .println ("Hopper Deployed" )))
71+ .withDeadline (Commands .waitSeconds (1 )));
72+
73+ NamedCommands .registerCommand (
74+ "hopper retract" ,
75+ Commands .runEnd (
76+ () -> hopper .move (HopperConfig .HOPPER_RETRACT_ROTATION ),
77+ () -> hopper .stop (),
78+ hopper )
79+ .alongWith (Commands .run (() -> System .out .println ("Hopper Retracted" )))
6980 .withDeadline (Commands .waitSeconds (2 )));
7081
7182 NamedCommands .registerCommand (
7283 "intake" ,
73- new IntakeCommand (intake , IntakeCommand .Position .INTAKE )
74- .withDeadline (Commands .waitSeconds (8 )));
84+ Commands .run (() -> intake .intake (IntakeConfig .INTAKE_INTAKE_SPEED ), intake )
85+ .alongWith (Commands .run (() -> System .out .println ("Intaking" ))));
86+
87+ NamedCommands .registerCommand (
88+ "rev shooter" ,
89+ new FlywheelCommand (flywheel , FlywheelCommand .Position .TRENCH_SHOT , drivetrain )
90+ .withDeadline (Commands .waitSeconds (1 )));
7591
7692 NamedCommands .registerCommand (
7793 "shoot long" ,
7894 Commands .parallel (
7995 new KickerCommand (kicker , KickerCommand .Position .INTAKE ),
80- Commands .runEnd (
81- () -> hopper .slowMove (HopperConfig .HOPPER_RETRACT_ROTATION ),
82- () -> hopper .stop (),
83- hopper )
84- .withDeadline (Commands .waitSeconds (2 )),
8596 new IntakeCommand (intake , IntakeCommand .Position .SLOW_INTAKE ),
8697 new FlywheelCommand (flywheel , FlywheelCommand .Position .TRENCH_SHOT , drivetrain ))
8798 .withDeadline (Commands .waitSeconds (8 )));
0 commit comments