midtownrobotics / 2024-Offseason

Other
0 stars 0 forks source link

Add new Auton Commands: EnableVision, DisableVision #83

Closed Mysterium422 closed 1 week ago

Mysterium422 commented 1 week ago

1) Create a variable within Limelight.java which will contain whether the LL should return vision updates. This variable will only be used for auton, so name it appropriately. autonVisionEnabled(?). Create a setter for the variable.

2) On the line which checks RobotState.isAutonomous(), make it so that if the RobotState is autonomous AND the created variable is false, then return null. This means that the robot will always return vision updates in Teleop, and only return vision updates in auton if that variable is true.

3) Create two new commands (extending InstantCommand) called EnableVision and DisableVision. They should take the limelight in the constructor, and run that setter accordingly.

4) Create copies of the Autos in PathPlanner. Enable Vision before running the shoot command, and Disable Vision before beginning the path.