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 |
Maxwell Henderson | 3d68e14 | 2024-02-25 09:58:11 -0800 | [diff] [blame] | 8 | // Zero is when the lowest extent of the lexan is level with the |
| 9 | // bellypan, positive is retracted inward. |
Niko Sohmers | 74b0ad5 | 2024-02-03 18:00:31 -0800 | [diff] [blame] | 10 | intake_pivot:frc971.AbsolutePosition (id: 0); |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 11 | |
| 12 | // Values of the encoder and potentiometer at the turret |
Maxwell Henderson | 3d68e14 | 2024-02-25 09:58:11 -0800 | [diff] [blame] | 13 | // Zero is facing backwards, positive is rotated counter-clockwise. |
| 14 | // I.e., zero is at approximately the loading position for getting |
| 15 | // the game piece from the extend into the catapult. |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 16 | turret:frc971.PotAndAbsolutePosition (id: 1); |
| 17 | |
| 18 | // Values of the encoder and potentiometer at the altitude |
Filip Kujawa | eab026a | 2024-02-14 20:07:39 -0800 | [diff] [blame] | 19 | // Zero is level with the ground, positive is raised upward. |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 20 | altitude:frc971.PotAndAbsolutePosition (id: 2); |
| 21 | |
| 22 | // Values of the encoder and potentiometer at the catapult |
Maxwell Henderson | 3d68e14 | 2024-02-25 09:58:11 -0800 | [diff] [blame] | 23 | // Zero is when the note is fully seated in the catapult and the catapult |
| 24 | // arm is just touching the note. Positive is rotated counter-clockwise, to |
| 25 | // launch game piece. |
Maxwell Henderson | bf04fb6 | 2024-01-19 17:56:07 -0800 | [diff] [blame] | 26 | catapult:frc971.PotAndAbsolutePosition (id: 3); |
Niko Sohmers | 78f7135 | 2024-02-02 16:47:40 -0800 | [diff] [blame] | 27 | |
| 28 | // True means there is a game piece in the transfer. |
| 29 | transfer_beambreak:bool (id: 4); |
Filip Kujawa | 5750715 | 2024-01-31 20:09:25 -0800 | [diff] [blame] | 30 | |
Niko Sohmers | 4d93d4c | 2024-03-24 14:48:26 -0700 | [diff] [blame^] | 31 | // Deprecated since climber no longer has an encoder |
| 32 | deprecated_climber:frc971.PotAndAbsolutePosition (id: 5, deprecated); |
| 33 | |
| 34 | // Value of the potentiometer at the climber. |
Maxwell Henderson | 3d68e14 | 2024-02-25 09:58:11 -0800 | [diff] [blame] | 35 | // Zero is fully extended, with top of the highest slider aligned with the |
| 36 | // caps on the tubes for the climber. |
| 37 | // Positive is more extended. |
Niko Sohmers | 4d93d4c | 2024-03-24 14:48:26 -0700 | [diff] [blame^] | 38 | climber:frc971.RelativePosition (id: 9); |
Maxwell Henderson | ed97029 | 2024-02-02 20:08:08 -0800 | [diff] [blame] | 39 | |
| 40 | // True if there is a game piece in the catapult |
Maxwell Henderson | 461a8a4 | 2024-02-23 17:07:39 -0800 | [diff] [blame] | 41 | catapult_beambreak:bool (id: 6); |
Filip Kujawa | 102a9b2 | 2024-02-18 09:40:23 -0800 | [diff] [blame] | 42 | |
| 43 | // Values of the encoder and potentiometer at the extend motor |
Maxwell Henderson | 3d68e14 | 2024-02-25 09:58:11 -0800 | [diff] [blame] | 44 | // Zero is fully retracted, positive is extended upward. |
Filip Kujawa | 102a9b2 | 2024-02-18 09:40:23 -0800 | [diff] [blame] | 45 | extend:frc971.PotAndAbsolutePosition (id: 7); |
| 46 | |
| 47 | // True means there is a game piece in the extend. |
| 48 | extend_beambreak:bool (id: 8); |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | root_type Position; |