Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 1 | include "frc971/control_loops/control_loops.fbs"; |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 2 | include "frc971/control_loops/profiled_subsystem.fbs"; |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 3 | |
| 4 | namespace y2024.control_loops.superstructure; |
| 5 | |
| 6 | table Position { |
Niko Sohmers | 58e64c8 | 2024-01-14 12:49:54 -0800 | [diff] [blame] | 7 | // Values of the encoder and potentiometer at the intake pivot |
Filip Kujawa | eab026a | 2024-02-14 20:07:39 -0800 | [diff] [blame^] | 8 | // Zero is extended outwards and level, positive is retracted inward. |
Niko Sohmers | 74b0ad5 | 2024-02-03 18:00:31 -0800 | [diff] [blame] | 9 | intake_pivot:frc971.AbsolutePosition (id: 0); |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 10 | |
| 11 | // Values of the encoder and potentiometer at the turret |
Filip Kujawa | eab026a | 2024-02-14 20:07:39 -0800 | [diff] [blame^] | 12 | // Zero is facing forward, positive is rotated right. |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 13 | turret:frc971.PotAndAbsolutePosition (id: 1); |
| 14 | |
| 15 | // Values of the encoder and potentiometer at the altitude |
Filip Kujawa | eab026a | 2024-02-14 20:07:39 -0800 | [diff] [blame^] | 16 | // Zero is level with the ground, positive is raised upward. |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 17 | altitude:frc971.PotAndAbsolutePosition (id: 2); |
| 18 | |
| 19 | // Values of the encoder and potentiometer at the catapult |
Filip Kujawa | eab026a | 2024-02-14 20:07:39 -0800 | [diff] [blame^] | 20 | // Zero is edge of pivot plate parallel to edge of gusset. |
| 21 | // Positive is rotated counter-clockwise, to launch game piece. |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 22 | catapult:frc971.PotAndAbsolutePosition (id: 3); |
Niko Sohmers | 78f7135 | 2024-02-02 16:47:40 -0800 | [diff] [blame] | 23 | |
| 24 | // True means there is a game piece in the transfer. |
| 25 | transfer_beambreak:bool (id: 4); |
Filip Kujawa | 5750715 | 2024-01-31 20:09:25 -0800 | [diff] [blame] | 26 | |
| 27 | // Values of the encoder and potentiometer at the climber. |
| 28 | // Zero is fully retracted, positive is extended upward. |
| 29 | climber:frc971.PotAndAbsolutePosition (id: 5); |
Maxwell Henderson | ed97029 | 2024-02-02 20:08:08 -0800 | [diff] [blame] | 30 | |
| 31 | // True if there is a game piece in the catapult |
| 32 | catapult_beam_break:bool (id: 6); |
Filip Kujawa | 102a9b2 | 2024-02-18 09:40:23 -0800 | [diff] [blame] | 33 | |
| 34 | // Values of the encoder and potentiometer at the extend motor |
| 35 | // Zero is fully retracted, positive is extended outward. |
| 36 | extend:frc971.PotAndAbsolutePosition (id: 7); |
| 37 | |
| 38 | // True means there is a game piece in the extend. |
| 39 | extend_beambreak:bool (id: 8); |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | root_type Position; |