Support both the new intake and old intake
The gear ratio is like 2% different, not worth stressing about. The mag
encoder moved though, so it has 2 different ratios.
Calibrate the bot since everything got replaced...
Change-Id: I79b3b01b7bf829bd12a77911f9484b9ccb896205
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2023/wpilib_interface.cc b/y2023/wpilib_interface.cc
index 921531e..033d3d7 100644
--- a/y2023/wpilib_interface.cc
+++ b/y2023/wpilib_interface.cc
@@ -104,7 +104,8 @@
Values::kMaxProximalEncoderPulsesPerSecond(),
Values::kMaxDistalEncoderPulsesPerSecond(),
Values::kMaxRollJointEncoderPulsesPerSecond(),
- Values::kMaxWristEncoderPulsesPerSecond(),
+ Values::kMaxCompWristEncoderPulsesPerSecond(),
+ Values::kMaxPracticeWristEncoderPulsesPerSecond(),
});
static_assert(kMaxFastEncoderPulsesPerSecond <= 1300000,
"fast encoders are too fast");
@@ -461,7 +462,10 @@
frc971::AbsolutePositionT wrist;
CopyPosition(wrist_encoder_, &wrist,
Values::kWristEncoderCountsPerRevolution(),
- Values::kWristEncoderRatio(), false);
+ values_->wrist.subsystem_params.zeroing_constants
+ .one_revolution_distance /
+ (M_PI * 2.0),
+ values_->wrist_flipped);
flatbuffers::Offset<frc971::PotAndAbsolutePosition> proximal_offset =
frc971::PotAndAbsolutePosition::Pack(*builder.fbb(), &proximal);