blob: bda9bbf916d27fe84478668890a3eaf3d21df32f [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
Filip Kujawa102a9b22024-02-18 09:40:23 -08007enum IntakeRollerStatus : ubyte {
Niko Sohmers58e64c82024-01-14 12:49:54 -08008 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.
Filip Kujawa102a9b22024-02-18 09:40:23 -080024 turret:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 0);
Maxwell Hendersonbf04fb62024-01-19 17:56:07 -080025
26 // Estimated angle and angular velocitiy of the catapult.
Filip Kujawa102a9b22024-02-18 09:40:23 -080027 catapult:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 1);
Maxwell Hendersonbf04fb62024-01-19 17:56:07 -080028
29 // Estimated angle and angular velocitiy of the altitude.
Filip Kujawa102a9b22024-02-18 09:40:23 -080030 altitude:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 2);
Maxwell Hendersoned970292024-02-02 20:08:08 -080031
Filip Kujawa102a9b22024-02-18 09:40:23 -080032 catapult_state: 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
Filip Kujawa102a9b22024-02-18 09:40:23 -080036enum TransferRollerStatus : ubyte {
Niko Sohmers78f71352024-02-02 16:47:40 -080037 NONE = 0,
38 TRANSFERING_IN = 1,
39 TRANSFERING_OUT = 2,
40}
41
Filip Kujawa102a9b22024-02-18 09:40:23 -080042// Contains status of extend rollers
43// HAS_GAME_PIECE means we have a game piece
44// EMPTY means we don't have a game piece
45enum ExtendRollerStatus: ubyte {
46 HAS_GAME_PIECE = 0,
47 EMPTY = 1
48}
49
Niko Sohmers3860f8a2024-01-12 21:05:19 -080050table Status {
51 // All subsystems know their location.
52 zeroed:bool (id: 0);
53
54 // If true, we have aborted. This is the or of all subsystem estops.
55 estopped:bool (id: 1);
Niko Sohmers58e64c82024-01-14 12:49:54 -080056
Filip Kujawa102a9b22024-02-18 09:40:23 -080057 // Status of the rollers
58 intake_roller:IntakeRollerStatus (id: 2);
Niko Sohmers58e64c82024-01-14 12:49:54 -080059
60 // Estimated angle and angular velocitiy of the intake.
Filip Kujawa102a9b22024-02-18 09:40:23 -080061 intake_pivot:frc971.control_loops.AbsoluteEncoderProfiledJointStatus (id: 3);
Niko Sohmers78f71352024-02-02 16:47:40 -080062
Filip Kujawa102a9b22024-02-18 09:40:23 -080063 // Status of transfer rollers
64 transfer_roller:TransferRollerStatus (id: 4);
Filip Kujawa57507152024-01-31 20:09:25 -080065
66 // Estimated angle and angular velocitiy of the climber.
Filip Kujawa102a9b22024-02-18 09:40:23 -080067 climber:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 5);
Niko Sohmers11017112024-02-18 16:03:58 -080068
69 // Status of the subsytems involved in the shooter
Filip Kujawa102a9b22024-02-18 09:40:23 -080070 shooter:ShooterStatus (id: 6);
71
72 // Estimated angle and angular velocitiy of the extend.
73 extend:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 7);
74
75 // State of the extender rollers
76 extend_roller:ExtendRollerStatus (id: 8);
Niko Sohmers3860f8a2024-01-12 21:05:19 -080077}
78
79root_type Status;