Fix all the climber signs and make them all work
Now that the HW exists, let's do it. Zero is all the way down against
the hard stop.
Change-Id: I8661c25e6ce8badab26a6d1b642bcc9d754d4878
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2022/wpilib_interface.cc b/y2022/wpilib_interface.cc
index 69883b4..f23d3e2 100644
--- a/y2022/wpilib_interface.cc
+++ b/y2022/wpilib_interface.cc
@@ -79,7 +79,7 @@
double climber_pot_translate(double voltage) {
return voltage * Values::kClimberPotRatio() *
- (10.0 /*turns*/ / 5.0 /*volts*/) *
+ (5.0 /*turns*/ / 5.0 /*volts*/) *
Values::kClimberPotMetersPerRevolution();
}
@@ -510,7 +510,7 @@
}
void Write(const superstructure::Output &output) override {
- WritePwm(output.climber_voltage(), climber_falcon_.get());
+ WritePwm(-output.climber_voltage(), climber_falcon_.get());
WritePwm(output.intake_voltage_front(), intake_falcon_front_.get());
WritePwm(output.intake_voltage_back(), intake_falcon_back_.get());