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 | |
James Kuszmaul | b1b2d8e | 2020-02-21 21:11:46 -0800 | [diff] [blame] | 32 | table AimerStatus { |
| 33 | // The current goal angle for the turret auto-tracking, in radians. |
| 34 | turret_position:double; |
| 35 | // The current goal velocity for the turret, in radians / sec. |
| 36 | turret_velocity:double; |
James Kuszmaul | a53c3ac | 2020-02-22 19:36:01 -0800 | [diff] [blame] | 37 | // Whether we are currently aiming for the inner port. |
| 38 | aiming_for_inner_port:bool; |
James Kuszmaul | b1b2d8e | 2020-02-21 21:11:46 -0800 | [diff] [blame] | 39 | } |
| 40 | |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 41 | table Status { |
| 42 | // All subsystems know their location. |
| 43 | zeroed:bool; |
| 44 | |
Sabina Davis | 5187f86 | 2020-02-09 13:16:51 -0800 | [diff] [blame] | 45 | // 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] | 46 | estopped:bool; |
| 47 | |
Austin Schuh | 9dcd520 | 2020-02-20 20:06:04 -0800 | [diff] [blame] | 48 | // Subsystem status. |
Sabina Davis | 70d5e91 | 2020-01-31 21:10:37 -0800 | [diff] [blame] | 49 | hood:frc971.control_loops.AbsoluteEncoderProfiledJointStatus; |
Sabina Davis | 6b61de3 | 2020-02-02 12:42:51 -0800 | [diff] [blame] | 50 | intake:frc971.control_loops.AbsoluteEncoderProfiledJointStatus; |
Tyler Chatow | 1879acc | 2020-02-01 13:26:48 -0800 | [diff] [blame] | 51 | turret:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus; |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 52 | |
| 53 | // Shooter subsystem status. |
| 54 | shooter:ShooterStatus; |
Sabina Davis | 5187f86 | 2020-02-09 13:16:51 -0800 | [diff] [blame] | 55 | |
| 56 | // Status of the control_panel |
| 57 | control_panel:frc971.control_loops.RelativeEncoderProfiledJointStatus; |
James Kuszmaul | b1b2d8e | 2020-02-21 21:11:46 -0800 | [diff] [blame] | 58 | |
| 59 | // Status of the vision auto-tracking. |
| 60 | aimer:AimerStatus; |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | root_type Status; |