blob: ceed4170e8733d1c8543ceb9cdcc02be25493b87 [file] [log] [blame]
Niko Sohmers3860f8a2024-01-12 21:05:19 -08001include "frc971/control_loops/control_loops.fbs";
2include "frc971/control_loops/profiled_subsystem.fbs";
3
4namespace y2024.control_loops.superstructure;
5
Niko Sohmers58e64c82024-01-14 12:49:54 -08006// Contains if intake is intaking
7enum IntakeRollerState : ubyte {
8 NONE = 0,
9 SPITTING = 1,
10 INTAKING = 2,
11}
12
Maxwell Hendersoned970292024-02-02 20:08:08 -080013enum CatapultStatus: ubyte {
14 // Means we are waiting for a game piece
15 IDLE = 0,
16 // Means we have a game piece
17 LOADED = 1,
18 // Means we are firing a game piece
19 FIRING = 2,
20}
21
Maxwell Hendersonbf04fb62024-01-19 17:56:07 -080022table ShooterStatus {
23 // Estimated angle and angular velocitiy of the turret.
24 turret_state:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 0);
25
26 // Estimated angle and angular velocitiy of the catapult.
27 catapult_state:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 1);
28
29 // Estimated angle and angular velocitiy of the altitude.
30 altitude_state:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 2);
Maxwell Hendersoned970292024-02-02 20:08:08 -080031
32 catapult_status: CatapultStatus (id: 3);
Maxwell Hendersonbf04fb62024-01-19 17:56:07 -080033}
34
Niko Sohmers78f71352024-02-02 16:47:40 -080035// Contains status of transfer rollers
36enum TransferRollerState : ubyte {
37 NONE = 0,
38 TRANSFERING_IN = 1,
39 TRANSFERING_OUT = 2,
40}
41
Niko Sohmers3860f8a2024-01-12 21:05:19 -080042table Status {
43 // All subsystems know their location.
44 zeroed:bool (id: 0);
45
46 // If true, we have aborted. This is the or of all subsystem estops.
47 estopped:bool (id: 1);
Niko Sohmers58e64c82024-01-14 12:49:54 -080048
49 // State of the rollers
50 intake_roller_state:IntakeRollerState (id: 2);
51
52 // Estimated angle and angular velocitiy of the intake.
Niko Sohmers74b0ad52024-02-03 18:00:31 -080053 intake_pivot_state:frc971.control_loops.AbsoluteEncoderProfiledJointStatus (id: 3);
Niko Sohmers78f71352024-02-02 16:47:40 -080054
55 // State of transfer rollers
56 transfer_roller_state:TransferRollerState (id: 4);
Filip Kujawa57507152024-01-31 20:09:25 -080057
58 // Estimated angle and angular velocitiy of the climber.
59 climber_state:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 5);
Niko Sohmers11017112024-02-18 16:03:58 -080060
61 // Status of the subsytems involved in the shooter
62 shooter_status:ShooterStatus (id: 6);
Niko Sohmers3860f8a2024-01-12 21:05:19 -080063}
64
65root_type Status;