Flip roll joint direction
New sensing strategy flips roll's sensing direction. Rezero while we
are here.
Change-Id: Ic14a1e327b2214b83ae657ca6fedf1138d598499
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2023/constants.cc b/y2023/constants.cc
index c9eda5e..7e30898 100644
--- a/y2023/constants.cc
+++ b/y2023/constants.cc
@@ -93,16 +93,17 @@
0.0220711555235029 - 0.0162945074111813 + 0.00630344935527365 -
0.0164398318919943 - 0.145833494945215 + 0.234878799868491;
- roll_joint->zeroing.measured_absolute_position = 1.12525305971909;
+ roll_joint->zeroing.measured_absolute_position = 1.7229611246564;
roll_joint->potentiometer_offset =
- 3.87038557084874 - 0.0241774522172967 + 0.0711345168020632 -
- 0.866186131631967 - 0.0256788357596952 + 0.18101759154572017 -
- 0.0208958996127179 - 0.186395903925026 + 0.45801689548395 -
- 0.5935210745062 + 0.166256655718334 - 0.12591438680483 +
- 0.11972765117321;
+ -(3.87038557084874 - 0.0241774522172967 + 0.0711345168020632 -
+ 0.866186131631967 - 0.0256788357596952 + 0.18101759154572017 -
+ 0.0208958996127179 - 0.186395903925026 + 0.45801689548395 -
+ 0.5935210745062 + 0.166256655718334 - 0.12591438680483 +
+ 0.11972765117321 - 0.318724743041507) +
+ 0.0201047336425017;
wrist->subsystem_params.zeroing_constants.measured_absolute_position =
- 0.783151696328745;
+ 0.85247856535298;
break;
diff --git a/y2023/wpilib_interface.cc b/y2023/wpilib_interface.cc
index f88e120..12a1779 100644
--- a/y2023/wpilib_interface.cc
+++ b/y2023/wpilib_interface.cc
@@ -463,7 +463,7 @@
CopyPosition(roll_joint_encoder_, &roll_joint,
Values::kRollJointEncoderCountsPerRevolution(),
Values::kRollJointEncoderRatio(), roll_joint_pot_translate,
- true, values_->roll_joint.potentiometer_offset);
+ false, values_->roll_joint.potentiometer_offset);
frc971::AbsolutePositionT wrist;
CopyPosition(wrist_encoder_, &wrist,
Values::kWristEncoderCountsPerRevolution(),