Move arm constants to constants.h
Change-Id: I0fe6de83a62adc9e330ba55025cb88920a8e43e2
Signed-off-by: Maxwell Henderson <mxwhenderson@gmail.com>
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2023/control_loops/superstructure/arm/arm.h b/y2023/control_loops/superstructure/arm/arm.h
index 6b7da54..216b89d 100644
--- a/y2023/control_loops/superstructure/arm/arm.h
+++ b/y2023/control_loops/superstructure/arm/arm.h
@@ -23,26 +23,6 @@
public:
Arm(std::shared_ptr<const constants::Values> values);
- // if true, tune down all the constants for testing.
- static constexpr bool kGrannyMode() { return false; }
-
- // the operating voltage.
- static constexpr double kOperatingVoltage() {
- return kGrannyMode() ? 6.0 : 12.0;
- }
- static constexpr double kVMax() { return kGrannyMode() ? 4.0 : 9.5; }
- static constexpr double kPathlessVMax() { return 4.5; }
- static constexpr double kGotoPathVMax() { return 4.5; }
-
- static constexpr double kDt() { return 0.00505; }
- static constexpr std::chrono::nanoseconds kDtDuration() {
- return std::chrono::duration_cast<std::chrono::nanoseconds>(
- std::chrono::duration<double>(kDt()));
- }
- static constexpr double kAlpha0Max() { return kGrannyMode() ? 15.0 : 15.0; }
- static constexpr double kAlpha1Max() { return kGrannyMode() ? 10.0 : 10.0; }
- static constexpr double kAlpha2Max() { return kGrannyMode() ? 90.0 : 90.0; }
-
flatbuffers::Offset<superstructure::ArmStatus> Iterate(
const ::aos::monotonic_clock::time_point /*monotonic_now*/,
const uint32_t *unsafe_goal, const superstructure::ArmPosition *position,
@@ -89,7 +69,7 @@
const ::Eigen::DiagonalMatrix<double, 3> alpha_unitizer_;
- double vmax_ = kVMax();
+ double vmax_ = constants::Values::kArmVMax();
frc971::control_loops::arm::Dynamics dynamics_;