blob: 0f8dd503efe36ea0a576cb1038fcd7e2807ed96a [file] [log] [blame]
Niko Sohmers3860f8a2024-01-12 21:05:19 -08001include "frc971/vision/target_map.fbs";
Niko Sohmersb21dbdc2024-01-20 20:06:59 -08002include "frc971/control_loops/profiled_subsystem.fbs";
3include "frc971/zeroing/constants.fbs";
James Kuszmaul2549e752024-01-20 17:42:51 -08004include "frc971/control_loops/drivetrain/drivetrain_config.fbs";
Niko Sohmers3860f8a2024-01-12 21:05:19 -08005
6namespace y2024;
7
Maxwell Henderson93f37f22024-01-19 17:08:23 -08008table ShotParams {
9 shot_velocity: double (id: 0);
10 shot_angle: double (id: 1);
11}
12
13table InterpolationTablePoint {
14 distance_from_goal: double (id: 0);
15 shot_params: ShotParams (id: 1);
16}
Niko Sohmers3860f8a2024-01-12 21:05:19 -080017
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080018// Amount of voltage to give to the intake rollers when:
James Kuszmaul2549e752024-01-20 17:42:51 -080019// spitting, which represents voltage when IntakeRollerGoal is SPITTING
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080020// and intaking, which represents voltage when IntakeRollerGoal is INTAKING
21table IntakeRollerVoltages {
22 spitting:double (id: 0);
23 intaking:double (id: 1);
24}
Niko Sohmers3860f8a2024-01-12 21:05:19 -080025
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080026// 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
29table IntakePivotSetPoints {
30 extended:double (id: 0);
31 retracted:double (id: 1);
32}
33
34// Intake Constants
35table IntakeConstants {
36 intake_pivot_zero:frc971.zeroing.PotAndAbsoluteEncoderZeroingConstants (id: 0);
37 potentiometer_offset:double (id: 1);
38}
39
Niko Sohmers1259b2a2024-01-29 18:00:37 -080040// Stores current limits for motors
41table CurrentLimits {
42 intake_pivot_supply_current_limit:double (id: 0);
43 intake_pivot_stator_current_limit:double (id: 1);
44 intake_roller_supply_current_limit:double (id: 2);
45 intake_roller_stator_current_limit:double (id: 3);
Niko Sohmersed7ffc42024-02-03 16:05:19 -080046 transfer_roller_supply_current_limit:double (id: 4);
47 transfer_roller_stator_current_limit:double (id: 5);
Niko Sohmers1259b2a2024-01-29 18:00:37 -080048}
49
Nathan Leongb7a81bf2024-02-03 16:04:17 -080050table TransferRollerVoltages {
51 transfer_in:double (id: 0);
52 transfer_out:double (id: 1);
53}
54
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080055table RobotConstants {
56 intake_constants:IntakeConstants (id: 0);
57}
58
59// Common table for constants unrelated to the robot
60table Common {
61 target_map:frc971.vision.TargetMap (id: 0);
62 shooter_interpolation_table: [InterpolationTablePoint] (id: 1);
63 intake_roller_voltages:IntakeRollerVoltages (id : 2);
64 intake_pivot_set_points:IntakePivotSetPoints (id: 3);
65 intake_pivot:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemCommonParams (id: 4);
James Kuszmaul2549e752024-01-20 17:42:51 -080066 drivetrain:frc971.control_loops.drivetrain.fbs.DrivetrainConfig (id: 5);
Niko Sohmers1259b2a2024-01-29 18:00:37 -080067 current_limits:CurrentLimits (id: 6);
Nathan Leongb7a81bf2024-02-03 16:04:17 -080068 transfer_roller_voltages:TransferRollerVoltages (id: 7);
Niko Sohmers3860f8a2024-01-12 21:05:19 -080069}
70
71table Constants {
Niko Sohmersb21dbdc2024-01-20 20:06:59 -080072 robot:RobotConstants (id: 0);
73 common:Common (id: 1);
Niko Sohmers3860f8a2024-01-12 21:05:19 -080074}
75
James Kuszmaul2549e752024-01-20 17:42:51 -080076root_type Constants;