| include "frc971/control_loops/profiled_subsystem.fbs"; |
| include "frc971/control_loops/catapult/catapult_goal.fbs"; |
| |
| namespace y2022.control_loops.superstructure; |
| |
| // Which intake to transfer to the turret from. |
| enum RequestedIntake : ubyte { |
| kFront = 0, |
| kBack = 1, |
| } |
| |
| table Goal { |
| // Height of the climber above rest point |
| climber:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 0); |
| |
| // True if the servo should be released. |
| // Positive is moving it out |
| climber_servo:bool (id: 15); |
| |
| // Goal angles of intake joints. |
| // Positive is out, 0 is up. |
| intake_front:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 1); |
| intake_back:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 2); |
| |
| // Positive is rollers intaking. |
| // When spinning the rollers, the turret will be moved to that side, |
| // so both shouldn't be positive at the same time. |
| roller_speed_front:double (id: 3); |
| roller_speed_back:double (id: 4); |
| |
| // Positive is intaking front and spitting back, negative is the opposite |
| transfer_roller_speed:double (id: 5); |
| // Not used anymore - just one transfer roller speed to control both |
| transfer_roller_speed_back:double (id: 12, deprecated); |
| |
| // Factor to multiply robot velocity by and add to roller voltage. |
| roller_speed_compensation:double (id: 6); |
| |
| turret:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 7); |
| |
| // Catapult goal state. |
| catapult:frc971.control_loops.catapult.CatapultGoal (id: 8); |
| |
| // If true, fire! The robot will only fire when ready. |
| fire:bool (id: 9); |
| |
| // Aborts the shooting process if the ball has been loaded into the catapult |
| // and the superstructure is in the LOADED state. |
| cancel_shot:bool (id: 10); |
| |
| // If true, auto-track the turret to point at the goal. |
| auto_aim:bool (id: 11); |
| |
| // If true, we started with the ball loaded and should proceed to that state. |
| preloaded:bool (id: 13); |
| |
| // Specifies which intake the turret should move to to intake. |
| turret_intake:RequestedIntake (id: 14); |
| } |
| |
| |
| |
| root_type Goal; |