| include "frc971/control_loops/control_loops.fbs"; |
| include "frc971/control_loops/profiled_subsystem.fbs"; |
| include "frc971/control_loops/flywheel/flywheel_controller_status.fbs"; |
| |
| namespace y2020.control_loops.superstructure; |
| |
| enum Subsystem:byte { |
| FINISHER, |
| ACCELERATOR, |
| TURRET |
| } |
| |
| table ShooterStatus { |
| // The final wheel shooting the ball |
| finisher:frc971.control_loops.flywheel.FlywheelControllerStatus (id: 0); |
| |
| // The subsystem to accelerate the ball before the finisher |
| // Velocity is the fastest (top) wheel |
| accelerator_left:frc971.control_loops.flywheel.FlywheelControllerStatus (id: 1); |
| accelerator_right:frc971.control_loops.flywheel.FlywheelControllerStatus (id: 2); |
| |
| // If the shooter is ready, this is true. Note: don't use this for status |
| // checking, only for plotting. Changes in goal take time to impact this. |
| ready:bool (id: 3); |
| |
| // The total number of balls we have shot |
| balls_shot:int (id: 4); |
| } |
| |
| table AimerStatus { |
| // The current goal angle for the turret auto-tracking, in radians. |
| turret_position:double (id: 0); |
| // The current goal velocity for the turret, in radians / sec. |
| turret_velocity:double (id: 1); |
| // Whether we are currently aiming for the inner port. |
| aiming_for_inner_port:bool (id: 2); |
| // The current distance to the target, in meters. |
| target_distance:double (id: 3); |
| // The current "shot distance." When shooting on the fly, this may be |
| // different from the static distance to the target. |
| shot_distance:double (id: 4); |
| // Amount the shot is off from being dead-straight relative to the inner port. |
| inner_port_angle:double (id: 5); |
| } |
| |
| table Status { |
| // All subsystems know their location. |
| zeroed:bool (id: 0); |
| |
| // If true, we have aborted. This is if one or all subsystem estops. |
| estopped:bool (id: 1); |
| |
| // Subsystem status. |
| hood:frc971.control_loops.AbsoluteAndAbsoluteEncoderProfiledJointStatus (id: 2); |
| intake:frc971.control_loops.AbsoluteEncoderProfiledJointStatus (id: 3); |
| turret:frc971.control_loops.PotAndAbsoluteEncoderProfiledJointStatus (id: 4); |
| |
| // Shooter subsystem status. |
| shooter:ShooterStatus (id: 5); |
| |
| // Status of the control_panel |
| control_panel:frc971.control_loops.RelativeEncoderProfiledJointStatus (id: 6); |
| |
| // Status of the vision auto-tracking. |
| aimer:AimerStatus (id: 7); |
| |
| // Vector of the subsystems that are not at goal and are preventing shooting. |
| subsystems_not_ready:[Subsystem] (id: 8); |
| |
| // Total number of status send failures. |
| send_failures:uint64 (id: 9); |
| } |
| |
| root_type Status; |