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