Move PDP values out to a separate queue so the timestamps make sense etc
Change-Id: Iad5303c3446dc29f339f02af9c9c99dd7c75d8e0
diff --git a/y2014/wpilib/wpilib_interface.cc b/y2014/wpilib/wpilib_interface.cc
index cc634d9..13b2e7b 100644
--- a/y2014/wpilib/wpilib_interface.cc
+++ b/y2014/wpilib/wpilib_interface.cc
@@ -122,8 +122,7 @@
class SensorReader {
public:
- SensorReader(::frc971::wpilib::PDPFetcher *pdp_fetcher)
- : pdp_fetcher_(pdp_fetcher) {
+ SensorReader() {
// Set it to filter out anything shorter than 1/4 of the minimum pulse width
// we should ever see.
encoder_filter_.SetPeriodNanoSeconds(
@@ -280,7 +279,7 @@
}
void RunIteration() {
- ::frc971::wpilib::SendRobotState(my_pid_, ds_, pdp_fetcher_);
+ ::frc971::wpilib::SendRobotState(my_pid_, ds_);
const auto &values = constants::GetValues();
@@ -440,7 +439,6 @@
int32_t my_pid_;
DriverStation *ds_;
- ::frc971::wpilib::PDPFetcher *const pdp_fetcher_;
::std::unique_ptr<::frc971::wpilib::DMASynchronizer> dma_synchronizer_;
@@ -706,7 +704,7 @@
::frc971::wpilib::PDPFetcher pdp_fetcher;
::std::thread pdp_fetcher_thread(::std::ref(pdp_fetcher));
- SensorReader reader(&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.