Add climber code without tests
This runs a loop to follow the request.
Signed-off-by: Siddhant Kanwar <kanwarsiddhant@gmail.com>
Change-Id: Iad516390561175f74eb33e0cda6a505376a372ed
diff --git a/y2022/constants.h b/y2022/constants.h
index 92f3a48..6927567 100644
--- a/y2022/constants.h
+++ b/y2022/constants.h
@@ -55,8 +55,29 @@
.upper = 2.725 // Front Soft
};
}
+
// Climber
- static constexpr double kClimberSupplyCurrentLimit() { return 60.0; }
+ static constexpr ::frc971::constants::Range kClimberRange() {
+ return ::frc971::constants::Range{
+ .lower_hard = -0.01,
+ .upper_hard = 0.6,
+ .lower = 0.0,
+ .upper = 0.5
+ };
+ }
+ static constexpr double kClimberPotMetersPerRevolution() {
+ return 22 * 0.25 * 0.0254;
+ }
+ static constexpr double kClimberPotRatio() { return 1.0; }
+
+ struct PotConstants {
+ ::frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystemParams<
+ ::frc971::zeroing::RelativeEncoderZeroingEstimator>
+ subsystem_params;
+ double potentiometer_offset;
+ };
+
+ PotConstants climber;
// Intake
// two encoders with same gear ratio for intake