Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 1 | include "frc971/vision/target_map.fbs"; |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame^] | 2 | include "frc971/control_loops/profiled_subsystem.fbs"; |
| 3 | include "frc971/zeroing/constants.fbs"; |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 4 | |
| 5 | namespace y2024; |
| 6 | |
Maxwell Henderson | 93f37f2 | 2024-01-19 17:08:23 -0800 | [diff] [blame] | 7 | table ShotParams { |
| 8 | shot_velocity: double (id: 0); |
| 9 | shot_angle: double (id: 1); |
| 10 | } |
| 11 | |
| 12 | table InterpolationTablePoint { |
| 13 | distance_from_goal: double (id: 0); |
| 14 | shot_params: ShotParams (id: 1); |
| 15 | } |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 16 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame^] | 17 | // Amount of voltage to give to the intake rollers when: |
| 18 | // spitting, which represents voltage when IntakeRollerGoal is SPITTING |
| 19 | // and intaking, which represents voltage when IntakeRollerGoal is INTAKING |
| 20 | table IntakeRollerVoltages { |
| 21 | spitting:double (id: 0); |
| 22 | intaking:double (id: 1); |
| 23 | } |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 24 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame^] | 25 | // Set points for the pivot in radians when: |
| 26 | // extended, which represents radians for when IntakePivotGoal is EXTENDED |
| 27 | // and retracted, which represents radians for when IntakePivotGoal is RETRACTED or NONE |
| 28 | table IntakePivotSetPoints { |
| 29 | extended:double (id: 0); |
| 30 | retracted:double (id: 1); |
| 31 | } |
| 32 | |
| 33 | // Intake Constants |
| 34 | table IntakeConstants { |
| 35 | intake_pivot_zero:frc971.zeroing.PotAndAbsoluteEncoderZeroingConstants (id: 0); |
| 36 | potentiometer_offset:double (id: 1); |
| 37 | } |
| 38 | |
| 39 | table RobotConstants { |
| 40 | intake_constants:IntakeConstants (id: 0); |
| 41 | } |
| 42 | |
| 43 | // Common table for constants unrelated to the robot |
| 44 | table Common { |
| 45 | target_map:frc971.vision.TargetMap (id: 0); |
| 46 | shooter_interpolation_table: [InterpolationTablePoint] (id: 1); |
| 47 | intake_roller_voltages:IntakeRollerVoltages (id : 2); |
| 48 | intake_pivot_set_points:IntakePivotSetPoints (id: 3); |
| 49 | intake_pivot:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 4); |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | table Constants { |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame^] | 53 | robot:RobotConstants (id: 0); |
| 54 | common:Common (id: 1); |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 55 | } |
| 56 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame^] | 57 | root_type Constants; |