Add an interpolation table to constants.json
Signed-off-by: Maxwell Henderson <mxwhenderson@gmail.com>
Change-Id: Ifadbf49b7844801660cdf8c42b2749ad1ef3efd2
diff --git a/y2024/constants/common.json b/y2024/constants/common.json
index f9c79c6..279ec04 100644
--- a/y2024/constants/common.json
+++ b/y2024/constants/common.json
@@ -1 +1,10 @@
- "target_map": {% include 'y2024/vision/maps/target_map.json' %}
+"shooter_interpolation_table": [
+ {
+ "distance_from_goal": 0.0,
+ "shot_params": {
+ "shot_velocity": 0.0,
+ "shot_angle": 0.0
+ }
+ }
+],
+"target_map": {% include 'y2024/vision/maps/target_map.json' %}
diff --git a/y2024/constants/constants.fbs b/y2024/constants/constants.fbs
index ad34617..490bc99 100644
--- a/y2024/constants/constants.fbs
+++ b/y2024/constants/constants.fbs
@@ -2,6 +2,15 @@
namespace y2024;
+table ShotParams {
+ shot_velocity: double (id: 0);
+ shot_angle: double (id: 1);
+}
+
+table InterpolationTablePoint {
+ distance_from_goal: double (id: 0);
+ shot_params: ShotParams (id: 1);
+}
table RobotConstants {
@@ -10,6 +19,7 @@
table Constants {
target_map:frc971.vision.TargetMap (id: 0);
robot:RobotConstants (id: 1);
+ shooter_interpolation_table: [InterpolationTablePoint] (id: 2);
}
root_type Constants;