11package frc .robot .driver ;
22
33import edu .wpi .first .math .geometry .Translation2d ;
4+ import edu .wpi .first .wpilibj2 .command .Command ;
45import edu .wpi .first .wpilibj2 .command .ConditionalCommand ;
56import edu .wpi .first .wpilibj2 .command .InstantCommand ;
67import frc .crevolib .util .ExpCurve ;
2324import frc .robot .rushinator .RushinatorWrist ;
2425import frc .robot .rushinator .commands .SetArmState ;
2526import frc .robot .rushinator .commands .SetWristState ;
27+ import frc .robot .rushinator .commands .ToggleWristState ;
2628import frc .robot .rushinator .commands .SetRollersVoltage ;
2729import frc .robot .vision .commands .LineupCommand ;
2830
@@ -68,6 +70,11 @@ public void setupTeleopButtons() {
6870
6971 //Score Coral
7072 // controller.a().whileTrue(new SetRollersVoltage(-1.0));
73+ // controller.x().onTrue(new ConditionalCommand(
74+ // RobotCommands.coralPrime(RushinatorPivot.State.kScore, ElevatorSubsystem.State.kZero, RushinatorWrist.State.kScoreLeftWrist),
75+ // RobotCommands.coralPrime(RushinatorPivot.State.kScore, ElevatorSubsystem.State.kZero, RushinatorWrist.State.kScoreRightWrist),
76+ // () -> RushinatorWrist.kLastState == RushinatorWrist.State.kTravelLeft)
77+ // );
7178
7279 // Pulse Alage
7380 // controller.x().whileTrue(new AlgaeRoller.IntakeCommand());
@@ -93,6 +100,19 @@ public void setupTeleopButtons() {
93100 // controller.leftTrigger().whileTrue(new SetElevatorState(ElevatorSubsystem.State.kAlgaeIntake));
94101 // ELevator Setting Position ^^^^
95102
103+ // Toggle Wrist Left and Right
104+ // controller.povLeft().onTrue(new ConditionalCommand(
105+ // new SetWristState(RushinatorWrist.State.kTravelLeft),
106+ // new SetWristState(RushinatorWrist.State.kGroundMid),
107+ // () -> RushinatorPivot.kLastState != RushinatorPivot.State.kFloorIntake)
108+ // );
109+
110+ // controller.povRight().onTrue(new ConditionalCommand(
111+ // new SetWristState(RushinatorWrist.State.kTravelRight),
112+ // new SetWristState(RushinatorWrist.State.kGroundMid),
113+ // () -> RushinatorPivot.kLastState != RushinatorPivot.State.kFloorIntake)
114+ // );
115+
96116 // Zero Elevator
97117 // controller.leftBumper().onTrue(null);
98118
@@ -130,24 +150,58 @@ public void setupTeleopButtons() {
130150 /*Coral Arm Pivot TEsting */
131151 // controller.y().onTrue(new SetArmState(RushinatorPivot.State.kTestPos));
132152 // controller.a().onTrue(new SetArmState(RushinatorPivot.State.kTestPos2));
133- controller .y ().whileTrue (RobotCommands .coralPrime (
134- RushinatorPivot .State .kStowTravel , ElevatorSubsystem .State .kZero , RushinatorWrist .State .kTravelLeft )
135- );
136153
137- controller .x ().onTrue (new ConditionalCommand (
138- RobotCommands .coralPrime (RushinatorPivot .State .kScore , ElevatorSubsystem .State .kZero , RushinatorWrist .State .kScoreLeftWrist ),
139- RobotCommands .coralPrime (RushinatorPivot .State .kScore , ElevatorSubsystem .State .kZero , RushinatorWrist .State .kScoreRightWrist ),
140- () -> RushinatorWrist .kLastState == RushinatorWrist .State .kTravelLeft )
141- );
154+ // controller.x().onTrue(RobotCommands.coralPrime(
155+ // RushinatorPivot.State.kStowTravel, ElevatorSubsystem.State.kZero, RushinatorWrist.State.kTravelLeft)
156+ // );
157+
158+ // controller.b().onTrue(RobotCommands.coralPrime(
159+ // RushinatorPivot.State.kStowTravel, ElevatorSubsystem.State.kCoralL3, RushinatorWrist.State.kTravelLeft)
160+ // );
142161
143- controller .b ().onTrue (RobotCommands .toggleWristState ());
144-
145- controller .a ().whileTrue (RobotCommands .coralPrime (
146- RushinatorPivot .State .kFloorIntake , ElevatorSubsystem .State .kZero , RushinatorWrist .State .kGroundMid )
147- );
148- controller .a ().whileTrue (new SetRollersVoltage (4.0 ));
162+ // controller.y().onTrue(RobotCommands.coralPrime(
163+ // RushinatorPivot.State.kStowTravel, ElevatorSubsystem.State.kCoralL4, RushinatorWrist.State.kTravelLeft)
164+ // );
165+
166+ // controller.povLeft().onTrue(new ConditionalCommand(
167+ // new SetWristState(RushinatorWrist.State.kTravelLeft),
168+ // new SetWristState(RushinatorWrist.State.kGroundMid),
169+ // () -> RushinatorPivot.kLastState != RushinatorPivot.State.kFloorIntake)
170+ // );
149171
150- controller .leftBumper ().whileTrue (new SetRollersVoltage (-1.5 ));
172+ // controller.povRight().onTrue(new ConditionalCommand(
173+ // new SetWristState(RushinatorWrist.State.kTravelRight),
174+ // new SetWristState(RushinatorWrist.State.kGroundMid),
175+ // () -> RushinatorPivot.kLastState != RushinatorPivot.State.kFloorIntake)
176+ // );
177+
178+ // controller.rightBumper().onTrue(new ConditionalCommand(
179+ // RobotCommands.coralPrime(RushinatorPivot.State.kScore, ElevatorSubsystem.State.kZero, RushinatorWrist.State.kScoreLeftWrist),
180+ // RobotCommands.coralPrime(RushinatorPivot.State.kScore, ElevatorSubsystem.State.kZero, RushinatorWrist.State.kScoreRightWrist),
181+ // () -> RushinatorWrist.kLastState == RushinatorWrist.State.kTravelLeft)
182+ // );
183+ // controller.rightBumper().whileTrue(new SetRollersVoltage(-2.0));
184+
185+ // controller.a().whileTrue(RobotCommands.coralPrime(
186+ // RushinatorPivot.State.kFloorIntake, ElevatorSubsystem.State.kZero, RushinatorWrist.State.kGroundMid)
187+ // );
188+ // controller.a().whileTrue(new SetRollersVoltage(3.0));
189+
190+ // controller.leftBumper().whileTrue(new SetRollersVoltage(-1.5));
191+
192+ // controller.b().onTrue(new ToggleWristState());
193+ // controller.povLeft().onTrue(new ConditionalCommand(
194+ // new SetWristState(RushinatorWrist.State.kTravelLeft),
195+ // new SetWristState(RushinatorWrist.State.kGroundMid),
196+ // () -> RushinatorPivot.kLastState != RushinatorPivot.State.kFloorIntake)
197+ // );
198+
199+ // controller.povRight().onTrue(new ConditionalCommand(
200+ // new SetWristState(RushinatorWrist.State.kTravelRight),
201+ // new SetWristState(RushinatorWrist.State.kGroundMid),
202+ // () -> RushinatorPivot.kLastState != RushinatorPivot.State.kFloorIntake)
203+ // );
204+
151205 /*Wrist TEsting*/
152206 // controller.povLeft().onTrue(new SetWristState(RushinatorWrist.State.kScoreLeftWrist));
153207 // controller.povUp().onTrue(new SetWristState(RushinatorWrist.State.kPickUp));
0 commit comments