blob: 81293d362167c1058445a2bba32857794b223dd3 [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;
Austin Schuh43b9ae92020-02-29 23:08:38 -080017
18 // Voltage error.
19 voltage_error:double;
Tyler Chatowcf413662020-02-09 14:36:36 -080020}
21
22table ShooterStatus {
23 // The final wheel shooting the ball
Sabina Davisedf89472020-02-17 15:27:37 -080024 finisher:FlywheelControllerStatus;
Tyler Chatowcf413662020-02-09 14:36:36 -080025
Sabina Davisedf89472020-02-17 15:27:37 -080026 // The subsystem to accelerate the ball before the finisher
Austin Schuh9dcd5202020-02-20 20:06:04 -080027 // Velocity is the fastest (top) wheel
Sabina Davisedf89472020-02-17 15:27:37 -080028 accelerator_left:FlywheelControllerStatus;
29 accelerator_right:FlywheelControllerStatus;
Tyler Chatowcf413662020-02-09 14:36:36 -080030}
31
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080032table 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 Kuszmaula53c3ac2020-02-22 19:36:01 -080037 // Whether we are currently aiming for the inner port.
38 aiming_for_inner_port:bool;
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080039}
40
Stephan Massaltd021f972020-01-05 20:41:23 -080041table Status {
42 // All subsystems know their location.
43 zeroed:bool;
44
Sabina Davis5187f862020-02-09 13:16:51 -080045 // If true, we have aborted. This is if one or all subsystem estops.
Stephan Massaltd021f972020-01-05 20:41:23 -080046 estopped:bool;
47
Austin Schuh9dcd5202020-02-20 20:06:04 -080048 // Subsystem status.
Sabina Davis70d5e912020-01-31 21:10:37 -080049 hood:frc971.control_loops.AbsoluteEncoderProfiledJointStatus;
Sabina Davis6b61de32020-02-02 12:42:51 -080050 intake:frc971.control_loops.AbsoluteEncoderProfiledJointStatus;
Tyler Chatow1879acc2020-02-01 13:26:48 -080051 turret:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus;
Tyler Chatowcf413662020-02-09 14:36:36 -080052
53 // Shooter subsystem status.
54 shooter:ShooterStatus;
Sabina Davis5187f862020-02-09 13:16:51 -080055
56 // Status of the control_panel
57 control_panel:frc971.control_loops.RelativeEncoderProfiledJointStatus;
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080058
59 // Status of the vision auto-tracking.
60 aimer:AimerStatus;
Stephan Massaltd021f972020-01-05 20:41:23 -080061}
62
63root_type Status;