Pushed out drivetrain ratios from python.
Change-Id: Icfae095a57d7ba7cbb78cd9db3301359514af23f
diff --git a/y2016/constants.cc b/y2016/constants.cc
index f641e98..0785646 100644
--- a/y2016/constants.cc
+++ b/y2016/constants.cc
@@ -28,8 +28,7 @@
// ///// Mutual constants between robots. /////
const int Values::kZeroingSampleSize;
-constexpr double Values::kDrivetrainEncoderRatio, Values::kLowGearRatio,
- Values::kHighGearRatio, Values::kShooterEncoderRatio,
+constexpr double Values::kDrivetrainEncoderRatio, Values::kShooterEncoderRatio,
Values::kIntakeEncoderRatio, Values::kShoulderEncoderRatio,
Values::kWristEncoderRatio, Values::kIntakePotRatio,
Values::kShoulderPotRatio, Values::kWristPotRatio,
diff --git a/y2016/constants.h b/y2016/constants.h
index e4ecf5e..6e7c1a9 100644
--- a/y2016/constants.h
+++ b/y2016/constants.h
@@ -30,13 +30,6 @@
static constexpr double kDrivetrainEncoderRatio =
(18.0 / 36.0) /*output reduction*/ * (30.0 / 44.0) /*encoder gears*/;
- // The gear ratios from motor shafts to the drivetrain wheels for high and low
- // gear.
- static constexpr double kLowGearRatio =
- 14.0 / 48.0 * 18.0 / 60.0 * 18.0 / 36.0;
- static constexpr double kHighGearRatio =
- 14.0 / 48.0 * 28.0 / 50.0 * 18.0 / 36.0;
-
// Ratios for our subsystems.
static constexpr double kShooterEncoderRatio = 1.0;
static constexpr double kIntakeEncoderRatio =
diff --git a/y2016/control_loops/drivetrain/drivetrain_base.cc b/y2016/control_loops/drivetrain/drivetrain_base.cc
index 2a2f36d..cd0462b 100644
--- a/y2016/control_loops/drivetrain/drivetrain_base.cc
+++ b/y2016/control_loops/drivetrain/drivetrain_base.cc
@@ -37,9 +37,9 @@
drivetrain::kR,
drivetrain::kV,
drivetrain::kT,
+ drivetrain::kHighGearRatio,
+ drivetrain::kLowGearRatio,
- constants::Values::kHighGearRatio,
- constants::Values::kLowGearRatio,
kThreeStateDriveShifter,
kThreeStateDriveShifter};
diff --git a/y2016/control_loops/python/drivetrain.py b/y2016/control_loops/python/drivetrain.py
index 94905a2..bb86625 100755
--- a/y2016/control_loops/python/drivetrain.py
+++ b/y2016/control_loops/python/drivetrain.py
@@ -341,6 +341,10 @@
drivetrain_low_low.Kv))
dog_loop_writer.AddConstant(control_loop.Constant("kT", "%f",
drivetrain_low_low.Kt))
+ dog_loop_writer.AddConstant(control_loop.Constant("kLowGearRatio", "%f",
+ drivetrain_low_low.G_low))
+ dog_loop_writer.AddConstant(control_loop.Constant("kHighGearRatio", "%f",
+ drivetrain_high_high.G_high))
dog_loop_writer.Write(argv[1], argv[2])