Removed support for dual analog hall effect sensors for shifters

Change-Id: Ie521511f5181140de44c35385aac0b01b5116c06
diff --git a/y2014/constants.cc b/y2014/constants.cc
index d5a29be..8354e57 100644
--- a/y2014/constants.cc
+++ b/y2014/constants.cc
@@ -39,11 +39,11 @@
 const double kPracticeLowGearRatio = kCompLowGearRatio;
 const double kPracticeHighGearRatio = kCompHighGearRatio;
 
-const ShifterHallEffect kCompLeftDriveShifter{2.61, 2.33, 4.25, 3.28, 0.2, 0.7};
-const ShifterHallEffect kCompRightDriveShifter{2.94, 4.31, 4.32, 3.25, 0.2, 0.7};
+const DualHallShifterHallEffect kCompLeftDriveShifter{{2.33, 4.25, 0.2, 0.7}, 2.61, 3.28};
+const DualHallShifterHallEffect kCompRightDriveShifter{{4.31, 4.32, 0.2, 0.7}, 2.94, 3.25};
 
-const ShifterHallEffect kPracticeLeftDriveShifter{2.80, 3.05, 4.15, 3.2, 0.2, 0.7};
-const ShifterHallEffect kPracticeRightDriveShifter{2.90, 3.75, 3.80, 2.98, 0.2, 0.7};
+const DualHallShifterHallEffect kPracticeLeftDriveShifter{{3.05, 4.15, 0.2, 0.7}, 2.80, 3.2};
+const DualHallShifterHallEffect kPracticeRightDriveShifter{{3.75, 3.80, 0.2, 0.7}, 2.90, 2.98};
 
 const double shooter_zeroing_speed = 0.05;
 const double shooter_unload_speed = 0.08;
diff --git a/y2014/constants.h b/y2014/constants.h
index 7fb2507..4ce3714 100644
--- a/y2014/constants.h
+++ b/y2014/constants.h
@@ -9,7 +9,7 @@
 namespace y2014 {
 namespace constants {
 
-using ::frc971::constants::ShifterHallEffect;
+using ::frc971::constants::DualHallShifterHallEffect;
 
 // Has all of the numbers that change for both robots and makes it easy to
 // retrieve the values for the current one.
@@ -35,7 +35,7 @@
   // gear.
   double low_gear_ratio;
   double high_gear_ratio;
-  ShifterHallEffect left_drive, right_drive;
+  DualHallShifterHallEffect left_drive, right_drive;
   bool clutch_transmission;
 
   ::std::function<StateFeedbackLoop<2, 2, 2>()> make_v_drivetrain_loop;
diff --git a/y2014/control_loops/drivetrain/drivetrain_base.cc b/y2014/control_loops/drivetrain/drivetrain_base.cc
index ffb0ee3..2c3a6f8 100644
--- a/y2014/control_loops/drivetrain/drivetrain_base.cc
+++ b/y2014/control_loops/drivetrain/drivetrain_base.cc
@@ -30,8 +30,8 @@
 
       constants::GetValues().high_gear_ratio,
       constants::GetValues().low_gear_ratio,
-      constants::GetValues().left_drive,
-      constants::GetValues().right_drive,
+      constants::GetValues().left_drive.shifter_hall_effect,
+      constants::GetValues().right_drive.shifter_hall_effect,
       true,
       0,
       0.25,
diff --git a/y2014/wpilib_interface.cc b/y2014/wpilib_interface.cc
index b5dee33..a130544 100644
--- a/y2014/wpilib_interface.cc
+++ b/y2014/wpilib_interface.cc
@@ -86,14 +86,16 @@
          (3.5 /*wheel diameter*/ * 2.54 / 100.0 * M_PI) * 2.0 / 2.0;
 }
 
-float hall_translate(const constants::ShifterHallEffect &k, float in_low,
+float hall_translate(const constants::DualHallShifterHallEffect &k, float in_low,
                      float in_high) {
   const float low_ratio =
-      0.5 * (in_low - static_cast<float>(k.low_gear_low)) /
-      static_cast<float>(k.low_gear_middle - k.low_gear_low);
+      0.5 * (in_low - static_cast<float>(k.shifter_hall_effect.low_gear_low)) /
+      static_cast<float>(k.low_gear_middle - k.shifter_hall_effect.low_gear_low);
   const float high_ratio =
-      0.5 + 0.5 * (in_high - static_cast<float>(k.high_gear_middle)) /
-                static_cast<float>(k.high_gear_high - k.high_gear_middle);
+      0.5 +
+      0.5 * (in_high - static_cast<float>(k.high_gear_middle)) /
+          static_cast<float>(k.shifter_hall_effect.high_gear_high -
+                             k.high_gear_middle);
 
   // Return low when we are below 1/2, and high when we are above 1/2.
   if (low_ratio + high_ratio < 1.0) {