Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 1 | include "frc971/control_loops/profiled_subsystem.fbs"; |
Nathan Leong | dd72800 | 2024-02-03 15:26:53 -0800 | [diff] [blame] | 2 | include "frc971/control_loops/catapult/catapult_goal.fbs"; |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 3 | |
| 4 | namespace y2024.control_loops.superstructure; |
| 5 | |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 6 | // Represents goal for intake rollers |
| 7 | enum IntakeRollerGoal : ubyte { |
| 8 | NONE = 0, |
| 9 | SPIT = 1, |
| 10 | INTAKE = 2, |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 11 | } |
| 12 | |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 13 | // Represents goal for pivot on intake |
| 14 | enum IntakePivotGoal : ubyte { |
| 15 | EXTENDED = 0, |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 16 | RETRACTED = 1, |
| 17 | } |
| 18 | |
Niko Sohmers | 78f7135 | 2024-02-02 16:47:40 -0800 | [diff] [blame] | 19 | // Represents goal of transfer rollers |
| 20 | // TRANSFER_IN is for transfering game piece in from the intake to the shooter |
| 21 | // TRANSFER_OUT is for transfering game piece out to the intake for spitting |
| 22 | enum TransferRollerGoal : ubyte { |
| 23 | NONE = 0, |
| 24 | TRANSFER_IN = 1, |
| 25 | TRANSFER_OUT = 2, |
| 26 | } |
| 27 | |
Filip Kujawa | 5750715 | 2024-01-31 20:09:25 -0800 | [diff] [blame] | 28 | // Represents goal for climber |
| 29 | // FULL_EXTEND is for fully extending the climber |
| 30 | // HALF_EXTEND is for partially extending the climber |
| 31 | // RETRACT is for retracting the climber |
| 32 | enum ClimberGoal : ubyte { |
| 33 | FULL_EXTEND = 0, |
| 34 | HALF_EXTEND = 1, |
| 35 | RETRACT = 2, |
| 36 | } |
| 37 | |
Maxwell Henderson | ed97029 | 2024-02-02 20:08:08 -0800 | [diff] [blame^] | 38 | table ShooterGoal { |
| 39 | catapult_goal:frc971.control_loops.catapult.CatapultGoal (id: 0); |
| 40 | fire: bool (id: 1); |
| 41 | // If true we ignore the other provided positions |
| 42 | auto_aim: bool (id: 2); |
| 43 | |
| 44 | // Position for the turret when we aren't auto aiming |
| 45 | turret_position: frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 3); |
| 46 | |
| 47 | // Position for the altitude when we aren't auto aiming |
| 48 | altitude_position: frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 4); |
| 49 | } |
| 50 | |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 51 | table Goal { |
| 52 | intake_roller_goal:IntakeRollerGoal (id: 0); |
| 53 | intake_pivot_goal:IntakePivotGoal (id: 1); |
Nathan Leong | dd72800 | 2024-02-03 15:26:53 -0800 | [diff] [blame] | 54 | catapult_goal:frc971.control_loops.catapult.CatapultGoal (id: 2); |
Niko Sohmers | 78f7135 | 2024-02-02 16:47:40 -0800 | [diff] [blame] | 55 | transfer_roller_goal:TransferRollerGoal (id: 3); |
Filip Kujawa | 5750715 | 2024-01-31 20:09:25 -0800 | [diff] [blame] | 56 | climber_goal:ClimberGoal (id: 4); |
Maxwell Henderson | ed97029 | 2024-02-02 20:08:08 -0800 | [diff] [blame^] | 57 | shooter_goal:ShooterGoal (id: 5); |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 58 | } |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 59 | root_type Goal; |