Convert y2014 to y2016, and get the drivetrain running.

I made a y2016 folder based on what was in y2014. Right now, it only has
a drivetrain control loop, and all the constants are not up to date with
the current CAD design. Changes from y2014 can be viewed by comparing to
the BASE commit, since I put this commit on top of a dummy y2014 folder
renamed y2016. Hope this helps.

Change-Id: I3f1d1d1a14a99ac441c51b2a67cbade7cbd708ab
diff --git a/y2016/wpilib/BUILD b/y2016/wpilib/BUILD
index 120ff49..9521d74 100644
--- a/y2016/wpilib/BUILD
+++ b/y2016/wpilib/BUILD
@@ -6,15 +6,8 @@
     'wpilib_interface.cc',
   ],
   deps = [
-    '//aos/linux_code:init',
     '//aos/common:stl_mutex',
     '//aos/common/logging',
-    '//aos/externals:wpilib',
-    '//y2014:constants',
-    '//y2014/queues:auto_mode',
-    '//frc971/control_loops/drivetrain:drivetrain_queue',
-    '//y2014/control_loops/shooter:shooter_queue',
-    '//y2014/control_loops/claw:claw_queue',
     '//aos/common/controls:control_loop',
     '//aos/common/util:log_interval',
     '//aos/common:time',
@@ -22,6 +15,9 @@
     '//aos/common/messages:robot_state',
     '//aos/common/util:phased_loop',
     '//aos/common/util:wrapping_counter',
+    '//aos/linux_code:init',
+    '//aos/externals:wpilib',
+    '//frc971/control_loops/drivetrain:drivetrain_queue',
     '//frc971/wpilib:joystick_sender',
     '//frc971/wpilib:loop_output_handler',
     '//frc971/wpilib:buffered_pcm',
@@ -34,5 +30,6 @@
     '//frc971/wpilib:logging_queue',
     '//frc971/wpilib:wpilib_interface',
     '//frc971/wpilib:pdp_fetcher',
+    '//y2016:constants',
   ],
 )
diff --git a/y2016/wpilib/wpilib_interface.cc b/y2016/wpilib/wpilib_interface.cc
index 6442a2a..7bcf0bc 100644
--- a/y2016/wpilib/wpilib_interface.cc
+++ b/y2016/wpilib/wpilib_interface.cc
@@ -33,10 +33,7 @@
 #include "frc971/shifter_hall_effect.h"
 
 #include "frc971/control_loops/drivetrain/drivetrain.q.h"
-#include "y2014/control_loops/claw/claw.q.h"
-#include "y2014/control_loops/shooter/shooter.q.h"
-#include "y2014/constants.h"
-#include "y2014/queues/auto_mode.q.h"
+#include "y2016/constants.h"
 
 #include "frc971/wpilib/joystick_sender.h"
 #include "frc971/wpilib/loop_output_handler.h"
@@ -55,10 +52,8 @@
 #endif
 
 using ::frc971::control_loops::drivetrain_queue;
-using ::y2014::control_loops::claw_queue;
-using ::y2014::control_loops::shooter_queue;
 
-namespace y2014 {
+namespace y2016 {
 namespace wpilib {
 
 // TODO(Brian): Fix the interpretation of the result of GetRaw here and in the
@@ -73,8 +68,7 @@
 }
 
 double drivetrain_translate(int32_t in) {
-  return -static_cast<double>(in) /
-         (256.0 /*cpr*/ * 4.0 /*4x*/) *
+  return -static_cast<double>(in) / (256.0 /*cpr*/ * 4.0 /*4x*/) *
          constants::GetValues().drivetrain_encoder_ratio *
          (3.5 /*wheel diameter*/ * 2.54 / 100.0 * M_PI) * 2.0 / 2.0;
 }
@@ -91,8 +85,9 @@
       0.5 * (in_low - static_cast<float>(k.low_gear_low)) /
       static_cast<float>(k.low_gear_middle - k.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.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) {
@@ -102,22 +97,11 @@
   }
 }
 
-double claw_translate(int32_t in) {
-  return -static_cast<double>(in) / (256.0 /*cpr*/ * 4.0 /*quad*/) /
-         (18.0 / 48.0 /*encoder gears*/) / (12.0 / 60.0 /*chain reduction*/) *
-         (M_PI / 180.0) * 2.0;
-}
-
-double shooter_translate(int32_t in) {
-  return static_cast<double>(in) / (256.0 /*cpr*/ * 4.0 /*quad*/) *
-         16 /*sprocket teeth*/ * 0.375 /*chain pitch*/
-         * (2.54 / 100.0 /*in to m*/);
-}
-
+// TODO(constants): Update.
 static const double kMaximumEncoderPulsesPerSecond =
     5600.0 /* free speed RPM */ * 14.0 / 48.0 /* bottom gear reduction */ *
-    18.0 / 32.0 /* big belt reduction */ *
-    18.0 / 66.0 /* top gear reduction */ * 48.0 / 18.0 /* encoder gears */ /
+    18.0 / 32.0 /* big belt reduction */ * 18.0 /
+    66.0 /* top gear reduction */ * 48.0 / 18.0 /* encoder gears */ /
     60.0 /* seconds / minute */ * 256.0 /* CPR */;
 
 class SensorReader {
@@ -130,10 +114,6 @@
     hall_filter_.SetPeriodNanoSeconds(100000);
   }
 
-  void set_auto_selector_analog(::std::unique_ptr<AnalogInput> analog) {
-    auto_selector_analog_ = ::std::move(analog);
-  }
-
   void set_drivetrain_left_encoder(::std::unique_ptr<Encoder> encoder) {
     drivetrain_left_encoder_ = ::std::move(encoder);
     drivetrain_left_encoder_->SetMaxPeriod(0.005);
@@ -160,89 +140,13 @@
     low_left_drive_hall_ = ::std::move(analog);
   }
 
-  void set_top_claw_encoder(::std::unique_ptr<Encoder> encoder) {
-    encoder_filter_.Add(encoder.get());
-    top_reader_.set_encoder(::std::move(encoder));
-  }
-
-  void set_top_claw_front_hall(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    top_reader_.set_front_hall(::std::move(hall));
-  }
-
-  void set_top_claw_calibration_hall(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    top_reader_.set_calibration_hall(::std::move(hall));
-  }
-
-  void set_top_claw_back_hall(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    top_reader_.set_back_hall(::std::move(hall));
-  }
-
-  void set_bottom_claw_encoder(::std::unique_ptr<Encoder> encoder) {
-    encoder_filter_.Add(encoder.get());
-    bottom_reader_.set_encoder(::std::move(encoder));
-  }
-
-  void set_bottom_claw_front_hall(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    bottom_reader_.set_front_hall(::std::move(hall));
-  }
-
-  void set_bottom_claw_calibration_hall(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    bottom_reader_.set_calibration_hall(::std::move(hall));
-  }
-
-  void set_bottom_claw_back_hall(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    bottom_reader_.set_back_hall(::std::move(hall));
-  }
-
-  void set_shooter_encoder(::std::unique_ptr<Encoder> encoder) {
-    encoder_filter_.Add(encoder.get());
-    shooter_encoder_ = ::std::move(encoder);
-  }
-
-  void set_shooter_proximal(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    shooter_proximal_ = ::std::move(hall);
-  }
-
-  void set_shooter_distal(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    shooter_distal_ = ::std::move(hall);
-  }
-
-  void set_shooter_plunger(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    shooter_plunger_ = ::std::move(hall);
-    shooter_plunger_reader_ =
-        make_unique<::frc971::wpilib::DMADigitalReader>(shooter_plunger_.get());
-  }
-
-  void set_shooter_latch(::std::unique_ptr<DigitalInput> hall) {
-    hall_filter_.Add(hall.get());
-    shooter_latch_ = ::std::move(hall);
-    shooter_latch_reader_ =
-        make_unique<::frc971::wpilib::DMADigitalReader>(shooter_latch_.get());
-  }
-
   // All of the DMA-related set_* calls must be made before this, and it doesn't
   // hurt to do all of them.
-  void set_dma(::std::unique_ptr<DMA> dma) {
-    shooter_proximal_counter_ = make_unique<::frc971::wpilib::DMAEdgeCounter>(
-        shooter_encoder_.get(), shooter_proximal_.get());
-    shooter_distal_counter_ = make_unique<::frc971::wpilib::DMAEdgeCounter>(
-        shooter_encoder_.get(), shooter_distal_.get());
 
+  // TODO(comran): Add 2016 things down below for dma synchronization.
+  void set_dma(::std::unique_ptr<DMA> dma) {
     dma_synchronizer_.reset(
         new ::frc971::wpilib::DMASynchronizer(::std::move(dma)));
-    dma_synchronizer_->Add(shooter_proximal_counter_.get());
-    dma_synchronizer_->Add(shooter_distal_counter_.get());
-    dma_synchronizer_->Add(shooter_plunger_reader_.get());
-    dma_synchronizer_->Add(shooter_latch_reader_.get());
   }
 
   void operator()() {
@@ -256,8 +160,6 @@
         &DriverStation::GetInstance();
 #endif
 
-    top_reader_.Start();
-    bottom_reader_.Start();
     dma_synchronizer_->Start();
 
     ::aos::time::PhasedLoop phased_loop(::aos::time::Time::InMS(5),
@@ -273,9 +175,6 @@
       }
       RunIteration();
     }
-
-    top_reader_.Quit();
-    bottom_reader_.Quit();
   }
 
   void RunIteration() {
@@ -310,140 +209,17 @@
       drivetrain_message.Send();
     }
 
-    ::y2014::sensors::auto_mode.MakeWithBuilder()
-        .voltage(auto_selector_analog_->GetVoltage())
-        .Send();
-
     dma_synchronizer_->RunIteration();
-
-    {
-      auto shooter_message = shooter_queue.position.MakeMessage();
-      shooter_message->position = shooter_translate(shooter_encoder_->GetRaw());
-      shooter_message->plunger = !shooter_plunger_reader_->value();
-      shooter_message->latch = !shooter_latch_reader_->value();
-      CopyShooterPosedgeCounts(shooter_proximal_counter_.get(),
-                               &shooter_message->pusher_proximal);
-      CopyShooterPosedgeCounts(shooter_distal_counter_.get(),
-                               &shooter_message->pusher_distal);
-
-      shooter_message.Send();
-    }
-
-    {
-      auto claw_message = claw_queue.position.MakeMessage();
-      top_reader_.RunIteration(&claw_message->top);
-      bottom_reader_.RunIteration(&claw_message->bottom);
-
-      claw_message.Send();
-    }
   }
 
   void Quit() { run_ = false; }
 
  private:
-  class HalfClawReader {
-   public:
-    HalfClawReader(bool reversed) : reversed_(reversed) {}
-
-    void set_encoder(::std::unique_ptr<Encoder> encoder) {
-      encoder_ = ::std::move(encoder);
-    }
-
-    void set_front_hall(::std::unique_ptr<DigitalInput> front_hall) {
-      front_hall_ = ::std::move(front_hall);
-    }
-
-    void set_calibration_hall(
-        ::std::unique_ptr<DigitalInput> calibration_hall) {
-      calibration_hall_ = ::std::move(calibration_hall);
-    }
-
-    void set_back_hall(::std::unique_ptr<DigitalInput> back_hall) {
-      back_hall_ = ::std::move(back_hall);
-    }
-
-    void Start() {
-      front_counter_ = make_unique<::frc971::wpilib::EdgeCounter>(
-          encoder_.get(), front_hall_.get());
-      synchronizer_.Add(front_counter_.get());
-      calibration_counter_ = make_unique<::frc971::wpilib::EdgeCounter>(
-          encoder_.get(), calibration_hall_.get());
-      synchronizer_.Add(calibration_counter_.get());
-      back_counter_ = make_unique<::frc971::wpilib::EdgeCounter>(
-          encoder_.get(), back_hall_.get());
-      synchronizer_.Add(back_counter_.get());
-      synchronized_encoder_ =
-          make_unique<::frc971::wpilib::InterruptSynchronizedEncoder>(
-              encoder_.get());
-      synchronizer_.Add(synchronized_encoder_.get());
-
-      synchronizer_.Start();
-    }
-
-    void Quit() { synchronizer_.Quit(); }
-
-    void RunIteration(control_loops::HalfClawPosition *half_claw_position) {
-      const double multiplier = reversed_ ? -1.0 : 1.0;
-
-      synchronizer_.RunIteration();
-
-      CopyPosition(front_counter_.get(), &half_claw_position->front);
-      CopyPosition(calibration_counter_.get(),
-                   &half_claw_position->calibration);
-      CopyPosition(back_counter_.get(), &half_claw_position->back);
-      half_claw_position->position =
-          multiplier * claw_translate(synchronized_encoder_->get());
-    }
-
-   private:
-    void CopyPosition(const ::frc971::wpilib::EdgeCounter *counter,
-                      ::frc971::HallEffectStruct *out) {
-      const double multiplier = reversed_ ? -1.0 : 1.0;
-
-      out->current = !counter->polled_value();
-      out->posedge_count = counter->negative_interrupt_count();
-      out->negedge_count = counter->positive_interrupt_count();
-      out->negedge_value =
-          multiplier * claw_translate(counter->last_positive_encoder_value());
-      out->posedge_value =
-          multiplier * claw_translate(counter->last_negative_encoder_value());
-    }
-
-    ::frc971::wpilib::InterruptSynchronizer synchronizer_{55};
-
-    ::std::unique_ptr<::frc971::wpilib::EdgeCounter> front_counter_;
-    ::std::unique_ptr<::frc971::wpilib::EdgeCounter> calibration_counter_;
-    ::std::unique_ptr<::frc971::wpilib::EdgeCounter> back_counter_;
-    ::std::unique_ptr<::frc971::wpilib::InterruptSynchronizedEncoder>
-        synchronized_encoder_;
-
-    ::std::unique_ptr<Encoder> encoder_;
-    ::std::unique_ptr<DigitalInput> front_hall_;
-    ::std::unique_ptr<DigitalInput> calibration_hall_;
-    ::std::unique_ptr<DigitalInput> back_hall_;
-
-    const bool reversed_;
-  };
-
-  void CopyShooterPosedgeCounts(
-      const ::frc971::wpilib::DMAEdgeCounter *counter,
-      ::frc971::PosedgeOnlyCountedHallEffectStruct *output) {
-    output->current = !counter->polled_value();
-    // These are inverted because the hall effects give logical false when
-    // there's a magnet in front of them.
-    output->posedge_count = counter->negative_count();
-    output->negedge_count = counter->positive_count();
-    output->posedge_value =
-        shooter_translate(counter->last_negative_encoder_value());
-  }
-
   int32_t my_pid_;
   DriverStation *ds_;
 
   ::std::unique_ptr<::frc971::wpilib::DMASynchronizer> dma_synchronizer_;
 
-  ::std::unique_ptr<AnalogInput> auto_selector_analog_;
-
   ::std::unique_ptr<Encoder> drivetrain_left_encoder_;
   ::std::unique_ptr<Encoder> drivetrain_right_encoder_;
   ::std::unique_ptr<AnalogInput> low_left_drive_hall_;
@@ -451,16 +227,6 @@
   ::std::unique_ptr<AnalogInput> low_right_drive_hall_;
   ::std::unique_ptr<AnalogInput> high_right_drive_hall_;
 
-  HalfClawReader top_reader_{false}, bottom_reader_{true};
-
-  ::std::unique_ptr<Encoder> shooter_encoder_;
-  ::std::unique_ptr<DigitalInput> shooter_proximal_, shooter_distal_;
-  ::std::unique_ptr<DigitalInput> shooter_plunger_, shooter_latch_;
-  ::std::unique_ptr<::frc971::wpilib::DMAEdgeCounter> shooter_proximal_counter_,
-      shooter_distal_counter_;
-  ::std::unique_ptr<::frc971::wpilib::DMADigitalReader> shooter_plunger_reader_,
-      shooter_latch_reader_;
-
   ::std::atomic<bool> run_{true};
   DigitalGlitchFilter encoder_filter_, hall_filter_;
 };
@@ -469,7 +235,6 @@
  public:
   SolenoidWriter(const ::std::unique_ptr<::frc971::wpilib::BufferedPcm> &pcm)
       : pcm_(pcm),
-        shooter_(".y2014.control_loops.shooter_queue.output"),
         drivetrain_(".frc971.control_loops.drivetrain_queue.output") {}
 
   void set_pressure_switch(::std::unique_ptr<DigitalInput> pressure_switch) {
@@ -490,16 +255,6 @@
     drivetrain_right_ = ::std::move(s);
   }
 
-  void set_shooter_latch(
-      ::std::unique_ptr<::frc971::wpilib::BufferedSolenoid> s) {
-    shooter_latch_ = ::std::move(s);
-  }
-
-  void set_shooter_brake(
-      ::std::unique_ptr<::frc971::wpilib::BufferedSolenoid> s) {
-    shooter_brake_ = ::std::move(s);
-  }
-
   void operator()() {
     ::aos::SetCurrentThreadName("Solenoids");
     ::aos::SetCurrentThreadRealtimePriority(27);
@@ -516,15 +271,6 @@
       }
 
       {
-        shooter_.FetchLatest();
-        if (shooter_.get()) {
-          LOG_STRUCT(DEBUG, "solenoids", *shooter_);
-          shooter_latch_->Set(!shooter_->latch_piston);
-          shooter_brake_->Set(!shooter_->brake_piston);
-        }
-      }
-
-      {
         drivetrain_.FetchLatest();
         if (drivetrain_.get()) {
           LOG_STRUCT(DEBUG, "solenoids", *drivetrain_);
@@ -559,13 +305,10 @@
 
   ::std::unique_ptr<::frc971::wpilib::BufferedSolenoid> drivetrain_left_;
   ::std::unique_ptr<::frc971::wpilib::BufferedSolenoid> drivetrain_right_;
-  ::std::unique_ptr<::frc971::wpilib::BufferedSolenoid> shooter_latch_;
-  ::std::unique_ptr<::frc971::wpilib::BufferedSolenoid> shooter_brake_;
 
   ::std::unique_ptr<DigitalInput> pressure_switch_;
   ::std::unique_ptr<Relay> compressor_relay_;
 
-  ::aos::Queue<::y2014::control_loops::ShooterQueue::Output> shooter_;
   ::aos::Queue<::frc971::control_loops::DrivetrainQueue::Output> drivetrain_;
 
   ::std::atomic<bool> run_{true};
@@ -603,91 +346,6 @@
   ::std::unique_ptr<Talon> right_drivetrain_talon_;
 };
 
-class ShooterWriter : public ::frc971::wpilib::LoopOutputHandler {
- public:
-  void set_shooter_talon(::std::unique_ptr<Talon> t) {
-    shooter_talon_ = ::std::move(t);
-  }
-
- private:
-  virtual void Read() override {
-    ::y2014::control_loops::shooter_queue.output.FetchAnother();
-  }
-
-  virtual void Write() override {
-    auto &queue = ::y2014::control_loops::shooter_queue.output;
-    LOG_STRUCT(DEBUG, "will output", *queue);
-    shooter_talon_->Set(queue->voltage / 12.0);
-  }
-
-  virtual void Stop() override {
-    LOG(WARNING, "shooter output too old\n");
-    shooter_talon_->Disable();
-  }
-
-  ::std::unique_ptr<Talon> shooter_talon_;
-};
-
-class ClawWriter : public ::frc971::wpilib::LoopOutputHandler {
- public:
-  void set_top_claw_talon(::std::unique_ptr<Talon> t) {
-    top_claw_talon_ = ::std::move(t);
-  }
-
-  void set_bottom_claw_talon(::std::unique_ptr<Talon> t) {
-    bottom_claw_talon_ = ::std::move(t);
-  }
-
-  void set_left_tusk_talon(::std::unique_ptr<Talon> t) {
-    left_tusk_talon_ = ::std::move(t);
-  }
-
-  void set_right_tusk_talon(::std::unique_ptr<Talon> t) {
-    right_tusk_talon_ = ::std::move(t);
-  }
-
-  void set_intake1_talon(::std::unique_ptr<Talon> t) {
-    intake1_talon_ = ::std::move(t);
-  }
-
-  void set_intake2_talon(::std::unique_ptr<Talon> t) {
-    intake2_talon_ = ::std::move(t);
-  }
-
- private:
-  virtual void Read() override {
-    ::y2014::control_loops::claw_queue.output.FetchAnother();
-  }
-
-  virtual void Write() override {
-    auto &queue = ::y2014::control_loops::claw_queue.output;
-    LOG_STRUCT(DEBUG, "will output", *queue);
-    intake1_talon_->Set(queue->intake_voltage / 12.0);
-    intake2_talon_->Set(queue->intake_voltage / 12.0);
-    bottom_claw_talon_->Set(-queue->bottom_claw_voltage / 12.0);
-    top_claw_talon_->Set(queue->top_claw_voltage / 12.0);
-    left_tusk_talon_->Set(queue->tusk_voltage / 12.0);
-    right_tusk_talon_->Set(-queue->tusk_voltage / 12.0);
-  }
-
-  virtual void Stop() override {
-    LOG(WARNING, "claw output too old\n");
-    intake1_talon_->Disable();
-    intake2_talon_->Disable();
-    bottom_claw_talon_->Disable();
-    top_claw_talon_->Disable();
-    left_tusk_talon_->Disable();
-    right_tusk_talon_->Disable();
-  }
-
-  ::std::unique_ptr<Talon> top_claw_talon_;
-  ::std::unique_ptr<Talon> bottom_claw_talon_;
-  ::std::unique_ptr<Talon> left_tusk_talon_;
-  ::std::unique_ptr<Talon> right_tusk_talon_;
-  ::std::unique_ptr<Talon> intake1_talon_;
-  ::std::unique_ptr<Talon> intake2_talon_;
-};
-
 class WPILibRobot : public ::frc971::wpilib::WPILibRobotBase {
  public:
   ::std::unique_ptr<Encoder> make_encoder(int index) {
@@ -706,12 +364,7 @@
     ::std::thread pdp_fetcher_thread(::std::ref(pdp_fetcher));
     SensorReader reader;
 
-    // Create this first to make sure it ends up in one of the lower-numbered
-    // FPGA slots so we can use it with DMA.
-    auto shooter_encoder_temp = make_encoder(2);
-
-    reader.set_auto_selector_analog(make_unique<AnalogInput>(4));
-
+    // TODO(constants): Update these input numbers.
     reader.set_drivetrain_left_encoder(make_encoder(0));
     reader.set_drivetrain_right_encoder(make_encoder(1));
     reader.set_high_left_drive_hall(make_unique<AnalogInput>(1));
@@ -719,22 +372,6 @@
     reader.set_high_right_drive_hall(make_unique<AnalogInput>(2));
     reader.set_low_right_drive_hall(make_unique<AnalogInput>(3));
 
-    reader.set_top_claw_encoder(make_encoder(3));
-    reader.set_top_claw_front_hall(make_unique<DigitalInput>(4));  // R2
-    reader.set_top_claw_calibration_hall(make_unique<DigitalInput>(3));  // R3
-    reader.set_top_claw_back_hall(make_unique<DigitalInput>(5));  // R1
-
-    reader.set_bottom_claw_encoder(make_encoder(4));
-    reader.set_bottom_claw_front_hall(make_unique<DigitalInput>(1));  // L2
-    reader.set_bottom_claw_calibration_hall(make_unique<DigitalInput>(0));  // L3
-    reader.set_bottom_claw_back_hall(make_unique<DigitalInput>(2));  // L1
-
-    reader.set_shooter_encoder(::std::move(shooter_encoder_temp));
-    reader.set_shooter_proximal(make_unique<DigitalInput>(6));  // S1
-    reader.set_shooter_distal(make_unique<DigitalInput>(7));  // S2
-    reader.set_shooter_plunger(make_unique<DigitalInput>(8));  // S3
-    reader.set_shooter_latch(make_unique<DigitalInput>(9));  // S4
-
     reader.set_dma(make_unique<DMA>());
     ::std::thread reader_thread(::std::ref(reader));
 
@@ -748,26 +385,11 @@
         ::std::unique_ptr<Talon>(new Talon(2)));
     ::std::thread drivetrain_writer_thread(::std::ref(drivetrain_writer));
 
-    ::y2014::wpilib::ClawWriter claw_writer;
-    claw_writer.set_top_claw_talon(::std::unique_ptr<Talon>(new Talon(1)));
-    claw_writer.set_bottom_claw_talon(::std::unique_ptr<Talon>(new Talon(0)));
-    claw_writer.set_left_tusk_talon(::std::unique_ptr<Talon>(new Talon(4)));
-    claw_writer.set_right_tusk_talon(::std::unique_ptr<Talon>(new Talon(3)));
-    claw_writer.set_intake1_talon(::std::unique_ptr<Talon>(new Talon(7)));
-    claw_writer.set_intake2_talon(::std::unique_ptr<Talon>(new Talon(8)));
-    ::std::thread claw_writer_thread(::std::ref(claw_writer));
-
-    ::y2014::wpilib::ShooterWriter shooter_writer;
-    shooter_writer.set_shooter_talon(::std::unique_ptr<Talon>(new Talon(6)));
-    ::std::thread shooter_writer_thread(::std::ref(shooter_writer));
-
     ::std::unique_ptr<::frc971::wpilib::BufferedPcm> pcm(
         new ::frc971::wpilib::BufferedPcm());
     SolenoidWriter solenoid_writer(pcm);
     solenoid_writer.set_drivetrain_left(pcm->MakeSolenoid(6));
     solenoid_writer.set_drivetrain_right(pcm->MakeSolenoid(7));
-    solenoid_writer.set_shooter_latch(pcm->MakeSolenoid(5));
-    solenoid_writer.set_shooter_brake(pcm->MakeSolenoid(4));
 
     solenoid_writer.set_pressure_switch(make_unique<DigitalInput>(25));
     solenoid_writer.set_compressor_relay(make_unique<Relay>(0));
@@ -796,10 +418,6 @@
 
     drivetrain_writer.Quit();
     drivetrain_writer_thread.join();
-    shooter_writer.Quit();
-    shooter_writer_thread.join();
-    claw_writer.Quit();
-    claw_writer_thread.join();
     solenoid_writer.Quit();
     solenoid_thread.join();
 
@@ -808,7 +426,6 @@
 };
 
 }  // namespace wpilib
-}  // namespace y2014
+}  // namespace y2016
 
-
-AOS_ROBOT_CLASS(::y2014::wpilib::WPILibRobot);
+AOS_ROBOT_CLASS(::y2016::wpilib::WPILibRobot);