blob: 5ae287c1274c338f13559f5675d95770653fdd2a [file] [log] [blame]
Stephan Massaltd021f972020-01-05 20:41:23 -08001include "frc971/control_loops/control_loops.fbs";
2include "frc971/control_loops/profiled_subsystem.fbs";
3
4namespace y2020.control_loops.superstructure;
5
Sabina Davisedf89472020-02-17 15:27:37 -08006table FlywheelControllerStatus {
Tyler Chatowcf413662020-02-09 14:36:36 -08007 // 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;
17}
18
19table ShooterStatus {
20 // The final wheel shooting the ball
Sabina Davisedf89472020-02-17 15:27:37 -080021 finisher:FlywheelControllerStatus;
Tyler Chatowcf413662020-02-09 14:36:36 -080022
Sabina Davisedf89472020-02-17 15:27:37 -080023 // The subsystem to accelerate the ball before the finisher
Austin Schuh9dcd5202020-02-20 20:06:04 -080024 // Velocity is the fastest (top) wheel
Sabina Davisedf89472020-02-17 15:27:37 -080025 accelerator_left:FlywheelControllerStatus;
26 accelerator_right:FlywheelControllerStatus;
Tyler Chatowcf413662020-02-09 14:36:36 -080027}
28
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080029table AimerStatus {
30 // The current goal angle for the turret auto-tracking, in radians.
31 turret_position:double;
32 // The current goal velocity for the turret, in radians / sec.
33 turret_velocity:double;
James Kuszmaula53c3ac2020-02-22 19:36:01 -080034 // Whether we are currently aiming for the inner port.
35 aiming_for_inner_port:bool;
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080036}
37
Stephan Massaltd021f972020-01-05 20:41:23 -080038table Status {
39 // All subsystems know their location.
40 zeroed:bool;
41
Sabina Davis5187f862020-02-09 13:16:51 -080042 // If true, we have aborted. This is if one or all subsystem estops.
Stephan Massaltd021f972020-01-05 20:41:23 -080043 estopped:bool;
44
Austin Schuh9dcd5202020-02-20 20:06:04 -080045 // Subsystem status.
Sabina Davis70d5e912020-01-31 21:10:37 -080046 hood:frc971.control_loops.AbsoluteEncoderProfiledJointStatus;
Sabina Davis6b61de32020-02-02 12:42:51 -080047 intake:frc971.control_loops.AbsoluteEncoderProfiledJointStatus;
Tyler Chatow1879acc2020-02-01 13:26:48 -080048 turret:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus;
Tyler Chatowcf413662020-02-09 14:36:36 -080049
50 // Shooter subsystem status.
51 shooter:ShooterStatus;
Sabina Davis5187f862020-02-09 13:16:51 -080052
53 // Status of the control_panel
54 control_panel:frc971.control_loops.RelativeEncoderProfiledJointStatus;
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080055
56 // Status of the vision auto-tracking.
57 aimer:AimerStatus;
Stephan Massaltd021f972020-01-05 20:41:23 -080058}
59
60root_type Status;