Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 1 | include "frc971/control_loops/control_loops.fbs"; |
| 2 | include "frc971/control_loops/profiled_subsystem.fbs"; |
| 3 | |
| 4 | namespace y2024.control_loops.superstructure; |
| 5 | |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 6 | // Contains if intake is intaking |
| 7 | enum IntakeRollerState : ubyte { |
| 8 | NONE = 0, |
| 9 | SPITTING = 1, |
| 10 | INTAKING = 2, |
| 11 | } |
| 12 | |
Maxwell Henderson | ed97029 | 2024-02-02 20:08:08 -0800 | [diff] [blame] | 13 | enum 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 Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 22 | table 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 Henderson | ed97029 | 2024-02-02 20:08:08 -0800 | [diff] [blame] | 31 | |
| 32 | catapult_status: CatapultStatus (id: 3); |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 33 | } |
| 34 | |
Niko Sohmers | 78f7135 | 2024-02-02 16:47:40 -0800 | [diff] [blame] | 35 | // Contains status of transfer rollers |
| 36 | enum TransferRollerState : ubyte { |
| 37 | NONE = 0, |
| 38 | TRANSFERING_IN = 1, |
| 39 | TRANSFERING_OUT = 2, |
| 40 | } |
| 41 | |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 42 | table 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 Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 48 | |
| 49 | // State of the rollers |
| 50 | intake_roller_state:IntakeRollerState (id: 2); |
| 51 | |
| 52 | // Estimated angle and angular velocitiy of the intake. |
Niko Sohmers | 74b0ad5 | 2024-02-03 18:00:31 -0800 | [diff] [blame] | 53 | intake_pivot_state:frc971.control_loops.AbsoluteEncoderProfiledJointStatus (id: 3); |
Niko Sohmers | 78f7135 | 2024-02-02 16:47:40 -0800 | [diff] [blame] | 54 | |
| 55 | // State of transfer rollers |
| 56 | transfer_roller_state:TransferRollerState (id: 4); |
Filip Kujawa | 5750715 | 2024-01-31 20:09:25 -0800 | [diff] [blame] | 57 | |
| 58 | // Estimated angle and angular velocitiy of the climber. |
| 59 | climber_state:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 5); |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | root_type Status; |