Add the ranges for the subsystems
Change-Id: I6e2c2aba2b677c729718e4c92219ca80af1c9a49
diff --git a/y2019/constants.h b/y2019/constants.h
index 5e1de7b..21c061c 100644
--- a/y2019/constants.h
+++ b/y2019/constants.h
@@ -59,6 +59,15 @@
return (1.0) * control_loops::superstructure::elevator::kRadius;
}
+ static constexpr ::frc971::constants::Range kElevatorRange() {
+ return ::frc971::constants::Range{
+ 0.0, // Bottom Hard
+ 1.44, // Top Hard
+ 0.025, // Bottom Soft
+ 1.415 // Top Soft
+ };
+ }
+
// Intake
static constexpr double kIntakeEncoderCountsPerRevolution() { return 4096.0; }
@@ -71,6 +80,15 @@
kIntakeEncoderCountsPerRevolution();
}
+ static constexpr ::frc971::constants::Range kIntakeRange() {
+ return ::frc971::constants::Range{
+ -1.15, // Back Hard
+ 1.36, // Front Hard
+ -1.14, // Back Soft
+ 1.22 // Front Soft
+ };
+ }
+
// Wrist
static constexpr double kWristEncoderCountsPerRevolution() { return 4096.0; }
@@ -87,6 +105,15 @@
static constexpr double kWristPotRatio() { return (24.0) / (84.0); }
+ static constexpr ::frc971::constants::Range kWristRange() {
+ return ::frc971::constants::Range{
+ -3.14, // Back Hard
+ 2.58, // Front Hard
+ -2.97, // Back Soft
+ 2.41 // Front Soft
+ };
+ }
+
// Stilts
static constexpr double kStiltsEncoderCountsPerRevolution() { return 4096.0; }
@@ -107,6 +134,15 @@
control_loops::superstructure::stilts::kRadius;
}
+ static constexpr ::frc971::constants::Range kStiltsRange() {
+ return ::frc971::constants::Range{
+ -0.026, // Top Hard
+ 0.693, // Bottom Hard
+ -0.02, // Top Soft
+ 0.673 // Bottom Soft
+ };
+ }
+
struct PotAndAbsConstants {
::frc971::constants::PotAndAbsoluteEncoderZeroingConstants zeroing;
double potentiometer_offset;