File tree Expand file tree Collapse file tree 3 files changed +41
-5
lines changed
src/main/java/wmironpatriots Expand file tree Collapse file tree 3 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,35 @@ public Robot() {
263263 .rightBumper ()
264264 .whileTrue (tail .setRollerSpeedCmmd (Tail .OUTPUTTING_SPEEDS ))
265265 .onFalse (tail .setRollerSpeedCmmd (0.0 ));
266+
267+ // * ALGAE DESCORING
268+
269+
270+ operatorController
271+ .povUp ()
272+ .whileTrue (
273+ tail .setRollerSpeedCmmd (1 ).alongWith (
274+ tail .setTargetPoseCmmd (Tail .POSE_MOVE_ANGLE )
275+ .until (() -> tail .inSetpointRange () && elevator .inSetpointRange ())
276+ .andThen (tail .setTargetPoseCmmd (Tail .POSE_ALGAE_HIGH ))))
277+ .whileTrue (
278+ elevator .setTargetPoseCmmd (Elevator .POSE_ALGAE_HIGH ).onlyIf (() -> tail .inSetpointRange ()))
279+ .whileFalse (tail .setRollerSpeedCmmd (0 ));
280+
281+ operatorController
282+ .povDown ()
283+ .whileTrue (
284+ tail .setRollerSpeedCmmd (1 ).alongWith (
285+ tail .setTargetPoseCmmd (Tail .POSE_MOVE_ANGLE )
286+ .until (() -> tail .inSetpointRange () && elevator .inSetpointRange ())
287+ .andThen (tail .setTargetPoseCmmd (Tail .POSE_ALGAE_LOW ))))
288+ .whileTrue (
289+ elevator .setTargetPoseCmmd (Elevator .POSE_ALGAE_LOW ).onlyIf (() -> tail .inSetpointRange ()))
290+ .whileFalse (tail .setRollerSpeedCmmd (0 ));
291+
292+
293+ operatorController .povDown ().whileTrue (tail .setTargetPoseCmmd (Tail .POSE_ALGAE_LOW ).alongWith (tail .setRollerSpeedCmmd (1 ))).whileFalse (tail .setRollerSpeedCmmd (0 ));
294+
266295
267296 // * SUPERSTRUCTURE INIT
268297 Map <Requests , Trigger > triggerMap = new HashMap <Superstructure .Requests , Trigger >();
Original file line number Diff line number Diff line change @@ -28,10 +28,14 @@ public abstract class Elevator extends SubsystemBase implements Logged {
2828 public static final double POSE_MAX_CARRIAGE_STAGE_ONE = 1.39903980829 ;
2929
3030 public static final double POSE_L1 = 0.0 ;
31- public static final double POSE_L2 = 3.16 ;
32- public static final double POSE_L3 = 7 ;
31+ public static final double POSE_L2 = ( 5.5 / 0.87835 / 3.14159 / 2 * 3 ); // 3.16;
32+ public static final double POSE_L3 = ( 13.5 / 0.87835 / 3.14159 / 2 * 3 ); // 7;
3333 public static final double POSE_L4 = 12.75 ;
3434
35+ public static final double POSE_ALGAE_HIGH = (10.5 / 0.87835 / 3.14159 / 2 * 3 );
36+ public static final double POSE_ALGAE_LOW = (2.5 / 0.87835 / 3.14159 / 2 * 3 );
37+
38+
3539 // Visualizer constants
3640 public static final double MAX_ELEVATOR_HEIGHT_INCHES = 57 ;
3741 public static final double STAGE_ZERO_HEIGHT_INCHES = 32 ;
Original file line number Diff line number Diff line change @@ -27,9 +27,12 @@ public abstract class Tail implements LoggedSubsystem {
2727 public static final double POSE_MOVE_ANGLE = 8.2 ;
2828
2929 public static final double POSE_L1 = 5.56 ;
30- public static final double POSE_L2 = 5 ;
31- public static final double POSE_L3 = 5.56 ;
32- public static final double POSE_L4 = 4 ;
30+ public static final double POSE_L2 = (20 * 5 / 36 );//5;
31+ public static final double POSE_L3 = (20 * 5 / 36 );//5.56;
32+ public static final double POSE_L4 = (30 * 5 / 36 );//4;
33+
34+ public static final double POSE_ALGAE_HIGH =(70 * 5 / 36 ); //uses formula
35+ public static final double POSE_ALGAE_LOW =(70 * 5 / 36 ); //uses formula
3336
3437 // Roller speeds
3538 public static final double INTAKING_SPEEDS = 2 ;
You can’t perform that action at this time.
0 commit comments