Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 1 | include "frc971/control_loops/profiled_subsystem.fbs"; |
| 2 | |
| 3 | namespace y2024.control_loops.superstructure; |
| 4 | |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 5 | // Represents goal for intake rollers |
| 6 | enum IntakeRollerGoal : ubyte { |
| 7 | NONE = 0, |
| 8 | SPIT = 1, |
| 9 | INTAKE = 2, |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 10 | } |
| 11 | |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 12 | // Represents goal for pivot on intake |
| 13 | enum IntakePivotGoal : ubyte { |
| 14 | EXTENDED = 0, |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 15 | RETRACTED = 1, |
| 16 | } |
| 17 | |
| 18 | table CatapultGoal { |
| 19 | // The target shot position and velocity. If these are provided before fire |
| 20 | // is called, the optimizer can pre-compute the trajectory. |
| 21 | shot_position: double (id: 0); |
| 22 | shot_velocity: double (id: 1); |
| 23 | |
| 24 | // Return position of the catapult |
| 25 | return_position: double (id: 2); |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | table Goal { |
| 29 | intake_roller_goal:IntakeRollerGoal (id: 0); |
| 30 | intake_pivot_goal:IntakePivotGoal (id: 1); |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 31 | |
| 32 | catapult_goal:CatapultGoal (id: 2); |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 33 | } |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 34 | |
| 35 | root_type Goal; |