blob: 39f108af162e2dbb4c232c8e142dc693ccd151c7 [file] [log] [blame]
Niko Sohmers3860f8a2024-01-12 21:05:19 -08001include "frc971/control_loops/profiled_subsystem.fbs";
Nathan Leongdd728002024-02-03 15:26:53 -08002include "frc971/control_loops/catapult/catapult_goal.fbs";
Niko Sohmers3860f8a2024-01-12 21:05:19 -08003
4namespace y2024.control_loops.superstructure;
5
Niko Sohmers58e64c82024-01-14 12:49:54 -08006// Represents goal for intake rollers
7enum IntakeRollerGoal : ubyte {
8 NONE = 0,
9 SPIT = 1,
10 INTAKE = 2,
Niko Sohmers3860f8a2024-01-12 21:05:19 -080011}
12
Niko Sohmers58e64c82024-01-14 12:49:54 -080013// Represents goal for pivot on intake
14enum IntakePivotGoal : ubyte {
15 EXTENDED = 0,
Maxwell Hendersonbf04fb62024-01-19 17:56:07 -080016 RETRACTED = 1,
17}
18
Niko Sohmers78f71352024-02-02 16:47:40 -080019// 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
22enum TransferRollerGoal : ubyte {
23 NONE = 0,
24 TRANSFER_IN = 1,
25 TRANSFER_OUT = 2,
26}
27
Filip Kujawa57507152024-01-31 20:09:25 -080028// 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
32enum ClimberGoal : ubyte {
33 FULL_EXTEND = 0,
34 HALF_EXTEND = 1,
35 RETRACT = 2,
36}
37
Maxwell Hendersoned970292024-02-02 20:08:08 -080038table 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);
Niko Sohmersc4d2c502024-02-19 19:35:35 -080049
50 // If true, we started with the ball loaded and should proceed to that state.
51 preloaded:bool = false (id: 5);
Maxwell Hendersoned970292024-02-02 20:08:08 -080052}
53
Filip Kujawa102a9b22024-02-18 09:40:23 -080054// Represents goal for extend
55// RETRACT is for retracting the extender to stowed position
56// In the retracted position, the game piece may be transfered to the catapult
57// AMP is for extending the extender to the AMP scoring position
58// TRAP is for extending the extender to the TRAP scoring position
59enum ExtendGoal : ubyte {
60 RETRACT = 0,
61 AMP = 1,
62 TRAP = 2,
63}
64
65enum ExtendRollerGoal : ubyte {
66 NONE = 0,
67 SCORING = 1,
68 REVERSING = 2,
69}
70
Niko Sohmers58e64c82024-01-14 12:49:54 -080071table Goal {
72 intake_roller_goal:IntakeRollerGoal (id: 0);
73 intake_pivot_goal:IntakePivotGoal (id: 1);
Nathan Leongdd728002024-02-03 15:26:53 -080074 catapult_goal:frc971.control_loops.catapult.CatapultGoal (id: 2);
Niko Sohmers78f71352024-02-02 16:47:40 -080075 transfer_roller_goal:TransferRollerGoal (id: 3);
Filip Kujawa57507152024-01-31 20:09:25 -080076 climber_goal:ClimberGoal (id: 4);
Maxwell Hendersoned970292024-02-02 20:08:08 -080077 shooter_goal:ShooterGoal (id: 5);
Filip Kujawa102a9b22024-02-18 09:40:23 -080078 extend_goal:ExtendGoal (id: 6);
79 extend_roller_goal:ExtendRollerGoal (id: 7);
Niko Sohmers58e64c82024-01-14 12:49:54 -080080}
Niko Sohmers3860f8a2024-01-12 21:05:19 -080081root_type Goal;