Jim Ostrowski | cb8b408 | 2024-01-21 02:23:46 -0800 | [diff] [blame^] | 1 | include "frc971/vision/calibration.fbs"; |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 2 | include "frc971/vision/target_map.fbs"; |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 3 | include "frc971/control_loops/profiled_subsystem.fbs"; |
| 4 | include "frc971/zeroing/constants.fbs"; |
James Kuszmaul | 2549e75 | 2024-01-20 17:42:51 -0800 | [diff] [blame] | 5 | include "frc971/control_loops/drivetrain/drivetrain_config.fbs"; |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 6 | |
| 7 | namespace y2024; |
| 8 | |
Jim Ostrowski | cb8b408 | 2024-01-21 02:23:46 -0800 | [diff] [blame^] | 9 | table CameraConfiguration { |
| 10 | calibration:frc971.vision.calibration.CameraCalibration (id: 0); |
| 11 | } |
| 12 | |
Maxwell Henderson | 93f37f2 | 2024-01-19 17:08:23 -0800 | [diff] [blame] | 13 | table ShotParams { |
| 14 | shot_velocity: double (id: 0); |
| 15 | shot_angle: double (id: 1); |
| 16 | } |
| 17 | |
| 18 | table InterpolationTablePoint { |
| 19 | distance_from_goal: double (id: 0); |
| 20 | shot_params: ShotParams (id: 1); |
| 21 | } |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 22 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 23 | // Amount of voltage to give to the intake rollers when: |
James Kuszmaul | 2549e75 | 2024-01-20 17:42:51 -0800 | [diff] [blame] | 24 | // spitting, which represents voltage when IntakeRollerGoal is SPITTING |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 25 | // and intaking, which represents voltage when IntakeRollerGoal is INTAKING |
| 26 | table IntakeRollerVoltages { |
| 27 | spitting:double (id: 0); |
| 28 | intaking:double (id: 1); |
| 29 | } |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 30 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 31 | // Set points for the pivot in radians when: |
| 32 | // extended, which represents radians for when IntakePivotGoal is EXTENDED |
| 33 | // and retracted, which represents radians for when IntakePivotGoal is RETRACTED or NONE |
| 34 | table IntakePivotSetPoints { |
| 35 | extended:double (id: 0); |
| 36 | retracted:double (id: 1); |
| 37 | } |
| 38 | |
| 39 | // Intake Constants |
| 40 | table IntakeConstants { |
| 41 | intake_pivot_zero:frc971.zeroing.PotAndAbsoluteEncoderZeroingConstants (id: 0); |
| 42 | potentiometer_offset:double (id: 1); |
| 43 | } |
| 44 | |
Niko Sohmers | 1259b2a | 2024-01-29 18:00:37 -0800 | [diff] [blame] | 45 | // Stores current limits for motors |
| 46 | table CurrentLimits { |
| 47 | intake_pivot_supply_current_limit:double (id: 0); |
| 48 | intake_pivot_stator_current_limit:double (id: 1); |
| 49 | intake_roller_supply_current_limit:double (id: 2); |
| 50 | intake_roller_stator_current_limit:double (id: 3); |
| 51 | } |
| 52 | |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 53 | table RobotConstants { |
| 54 | intake_constants:IntakeConstants (id: 0); |
| 55 | } |
| 56 | |
| 57 | // Common table for constants unrelated to the robot |
| 58 | table Common { |
| 59 | target_map:frc971.vision.TargetMap (id: 0); |
| 60 | shooter_interpolation_table: [InterpolationTablePoint] (id: 1); |
| 61 | intake_roller_voltages:IntakeRollerVoltages (id : 2); |
| 62 | intake_pivot_set_points:IntakePivotSetPoints (id: 3); |
| 63 | intake_pivot:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 4); |
James Kuszmaul | 2549e75 | 2024-01-20 17:42:51 -0800 | [diff] [blame] | 64 | drivetrain:frc971.control_loops.drivetrain.fbs.DrivetrainConfig (id: 5); |
Niko Sohmers | 1259b2a | 2024-01-29 18:00:37 -0800 | [diff] [blame] | 65 | current_limits:CurrentLimits (id: 6); |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | table Constants { |
Niko Sohmers | b21dbdc | 2024-01-20 20:06:59 -0800 | [diff] [blame] | 69 | robot:RobotConstants (id: 0); |
| 70 | common:Common (id: 1); |
Jim Ostrowski | cb8b408 | 2024-01-21 02:23:46 -0800 | [diff] [blame^] | 71 | cameras:[CameraConfiguration] (id: 2); |
Niko Sohmers | 3860f8a | 2024-01-12 21:05:19 -0800 | [diff] [blame] | 72 | } |
| 73 | |
James Kuszmaul | 2549e75 | 2024-01-20 17:42:51 -0800 | [diff] [blame] | 74 | root_type Constants; |