| include "frc971/control_loops/profiled_subsystem.fbs"; |
| include "frc971/control_loops/catapult/catapult_goal.fbs"; |
| |
| namespace y2024.control_loops.superstructure; |
| |
| // Represents goal for intake rollers |
| enum IntakeRollerGoal : ubyte { |
| NONE = 0, |
| SPIT = 1, |
| INTAKE = 2, |
| } |
| |
| // Represents goal for pivot on intake |
| enum IntakePivotGoal : ubyte { |
| EXTENDED = 0, |
| RETRACTED = 1, |
| } |
| |
| // Represents goal of transfer rollers |
| // TRANSFER_IN is for transfering game piece in from the intake to the shooter |
| // TRANSFER_OUT is for transfering game piece out to the intake for spitting |
| enum TransferRollerGoal : ubyte { |
| NONE = 0, |
| TRANSFER_IN = 1, |
| TRANSFER_OUT = 2, |
| } |
| |
| // Represents goal for climber |
| // FULL_EXTEND is for fully extending the climber |
| // HALF_EXTEND is for partially extending the climber |
| // RETRACT is for retracting the climber |
| enum ClimberGoal : ubyte { |
| FULL_EXTEND = 0, |
| HALF_EXTEND = 1, |
| RETRACT = 2, |
| } |
| |
| table ShooterGoal { |
| catapult_goal:frc971.control_loops.catapult.CatapultGoal (id: 0); |
| fire: bool (id: 1); |
| // If true we ignore the other provided positions |
| auto_aim: bool (id: 2); |
| |
| // Position for the turret when we aren't auto aiming |
| turret_position: frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 3); |
| |
| // Position for the altitude when we aren't auto aiming |
| altitude_position: frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 4); |
| } |
| |
| // Represents goal for extend |
| // RETRACT is for retracting the extender to stowed position |
| // In the retracted position, the game piece may be transfered to the catapult |
| // AMP is for extending the extender to the AMP scoring position |
| // TRAP is for extending the extender to the TRAP scoring position |
| enum ExtendGoal : ubyte { |
| RETRACT = 0, |
| AMP = 1, |
| TRAP = 2, |
| } |
| |
| enum ExtendRollerGoal : ubyte { |
| NONE = 0, |
| SCORING = 1, |
| REVERSING = 2, |
| } |
| |
| table Goal { |
| intake_roller_goal:IntakeRollerGoal (id: 0); |
| intake_pivot_goal:IntakePivotGoal (id: 1); |
| catapult_goal:frc971.control_loops.catapult.CatapultGoal (id: 2); |
| transfer_roller_goal:TransferRollerGoal (id: 3); |
| climber_goal:ClimberGoal (id: 4); |
| shooter_goal:ShooterGoal (id: 5); |
| extend_goal:ExtendGoal (id: 6); |
| extend_roller_goal:ExtendRollerGoal (id: 7); |
| } |
| root_type Goal; |