Moved Quit fuction into frc971 Sensor Reader.
Moved Quit from year specific to general file.
Change-Id: Id2acb3056708a866b7e1d5f8f89eebab7e8f31ad
diff --git a/frc971/wpilib/sensor_reader.h b/frc971/wpilib/sensor_reader.h
index 6453cef..3abe1b0 100644
--- a/frc971/wpilib/sensor_reader.h
+++ b/frc971/wpilib/sensor_reader.h
@@ -33,6 +33,9 @@
// Sets the pwm trigger.
void set_pwm_trigger(::std::unique_ptr<frc::DigitalInput> pwm_trigger);
+ // Stops the pwm trigger on the next iteration.
+ void Quit() { run_ = false; }
+
protected:
// Uses the pwm trigger to find the pwm cycle width and offset for that
// iteration.
diff --git a/y2019/wpilib_interface.cc b/y2019/wpilib_interface.cc
index 2a422d9..dcdf00b 100644
--- a/y2019/wpilib_interface.cc
+++ b/y2019/wpilib_interface.cc
@@ -183,7 +183,6 @@
dma_synchronizer_->RunIteration();
}
- void Quit() { run_ = false; }
private:
int32_t my_pid_;