Add altitude zeroing
Signed-off-by: Maxwell Henderson <mxwhenderson@gmail.com>
Change-Id: I5623efb67ab95dcc60547428c6a0988378aab817
diff --git a/y2024/constants/971.json b/y2024/constants/971.json
index 34962af..0762242 100644
--- a/y2024/constants/971.json
+++ b/y2024/constants/971.json
@@ -39,11 +39,11 @@
"altitude_constants": {
{% set _ = altitude_zero.update(
{
- "measured_absolute_position" : 0.0
+ "measured_absolute_position" : 0.130841088837793
}
) %}
"zeroing_constants": {{ altitude_zero | tojson(indent=2)}},
- "potentiometer_offset": 0.0
+ "potentiometer_offset": -0.15316323147786
},
"turret_constants": {
{% set _ = turret_zero.update(
diff --git a/y2024/wpilib_interface.cc b/y2024/wpilib_interface.cc
index 3d0b7a5..2cd4672 100644
--- a/y2024/wpilib_interface.cc
+++ b/y2024/wpilib_interface.cc
@@ -94,7 +94,7 @@
}
double altitude_pot_translate(double voltage) {
- return voltage * Values::kAltitudePotRadiansPerVolt();
+ return -1 * voltage * Values::kAltitudePotRadiansPerVolt();
}
double drivetrain_velocity_translate(double in) {