Add support for the IMU
Change-Id: Iaff4b088d9bec8edf439e00dda5b788cf87dff0c
diff --git a/y2016/wpilib/wpilib_interface.cc b/y2016/wpilib/wpilib_interface.cc
index 1898951..6d16323 100644
--- a/y2016/wpilib/wpilib_interface.cc
+++ b/y2016/wpilib/wpilib_interface.cc
@@ -49,6 +49,7 @@
#include "frc971/wpilib/logging.q.h"
#include "frc971/wpilib/wpilib_interface.h"
#include "frc971/wpilib/pdp_fetcher.h"
+#include "frc971/wpilib/ADIS16448.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
@@ -631,6 +632,12 @@
::frc971::wpilib::GyroSender gyro_sender;
::std::thread gyro_thread(::std::ref(gyro_sender));
+#if 0
+ auto imu_trigger = make_unique<DigitalInput>(100);
+ ::frc971::wpilib::ADIS16448 imu(SPI::Port::kOnboardCS1, imu_trigger.get());
+ ::std::thread imu_thread(::std::ref(imu));
+#endif
+
DrivetrainWriter drivetrain_writer;
drivetrain_writer.set_drivetrain_left_talon(
::std::unique_ptr<Talon>(new Talon(5)));
@@ -691,6 +698,10 @@
reader_thread.join();
gyro_sender.Quit();
gyro_thread.join();
+#if 0
+ imu.Quit();
+ imu_thread.join();
+#endif
drivetrain_writer.Quit();
drivetrain_writer_thread.join();