Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 1 | include "frc971/control_loops/control_loops.fbs"; |
| 2 | include "frc971/control_loops/profiled_subsystem.fbs"; |
| 3 | |
| 4 | namespace y2020.control_loops.superstructure; |
| 5 | |
Sabina Davis | edf8947 | 2020-02-17 15:27:37 -0800 | [diff] [blame] | 6 | table FlywheelControllerStatus { |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 7 | // The current average velocity in radians/second over the last kHistoryLength |
| 8 | // in shooter.h |
| 9 | avg_angular_velocity:double; |
| 10 | |
| 11 | // The current instantaneous filtered velocity in radians/second. |
| 12 | angular_velocity:double; |
| 13 | |
| 14 | // The target speed selected by the lookup table or from manual override |
| 15 | // Can be compared to velocity to determine if ready. |
| 16 | angular_velocity_goal:double; |
Austin Schuh | 43b9ae9 | 2020-02-29 23:08:38 -0800 | [diff] [blame^] | 17 | |
| 18 | // Voltage error. |
| 19 | voltage_error:double; |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | table ShooterStatus { |
| 23 | // The final wheel shooting the ball |
Sabina Davis | edf8947 | 2020-02-17 15:27:37 -0800 | [diff] [blame] | 24 | finisher:FlywheelControllerStatus; |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 25 | |
Sabina Davis | edf8947 | 2020-02-17 15:27:37 -0800 | [diff] [blame] | 26 | // The subsystem to accelerate the ball before the finisher |
Austin Schuh | 9dcd520 | 2020-02-20 20:06:04 -0800 | [diff] [blame] | 27 | // Velocity is the fastest (top) wheel |
Sabina Davis | edf8947 | 2020-02-17 15:27:37 -0800 | [diff] [blame] | 28 | accelerator_left:FlywheelControllerStatus; |
| 29 | accelerator_right:FlywheelControllerStatus; |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 30 | } |
| 31 | |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 32 | table Status { |
| 33 | // All subsystems know their location. |
| 34 | zeroed:bool; |
| 35 | |
Sabina Davis | 5187f86 | 2020-02-09 13:16:51 -0800 | [diff] [blame] | 36 | // If true, we have aborted. This is if one or all subsystem estops. |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 37 | estopped:bool; |
| 38 | |
Austin Schuh | 9dcd520 | 2020-02-20 20:06:04 -0800 | [diff] [blame] | 39 | // Subsystem status. |
Sabina Davis | 70d5e91 | 2020-01-31 21:10:37 -0800 | [diff] [blame] | 40 | hood:frc971.control_loops.AbsoluteEncoderProfiledJointStatus; |
Sabina Davis | 6b61de3 | 2020-02-02 12:42:51 -0800 | [diff] [blame] | 41 | intake:frc971.control_loops.AbsoluteEncoderProfiledJointStatus; |
Tyler Chatow | 1879acc | 2020-02-01 13:26:48 -0800 | [diff] [blame] | 42 | turret:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus; |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 43 | |
| 44 | // Shooter subsystem status. |
| 45 | shooter:ShooterStatus; |
Sabina Davis | 5187f86 | 2020-02-09 13:16:51 -0800 | [diff] [blame] | 46 | |
| 47 | // Status of the control_panel |
| 48 | control_panel:frc971.control_loops.RelativeEncoderProfiledJointStatus; |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | root_type Status; |