Refactor common IMU code into frc971

This lets us have different main functions for different years to manage
the hardware complexity.

Change-Id: Ia0fbef081265b6301e1d9e9ecc4f1d496f43a9cc
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2022/localizer/imu_main.cc b/y2022/localizer/imu_main.cc
index 53811ea..03dfc58 100644
--- a/y2022/localizer/imu_main.cc
+++ b/y2022/localizer/imu_main.cc
@@ -1,7 +1,8 @@
 #include "aos/events/shm_event_loop.h"
 #include "aos/init.h"
 #include "aos/realtime.h"
-#include "y2022/localizer/imu.h"
+#include "frc971/imu_reader/imu.h"
+#include "y2022/constants.h"
 
 DEFINE_string(config, "aos_config.json", "Path to the config file to use.");
 
@@ -15,7 +16,8 @@
       << ": Failed to set read permissions on IMU device.";
 
   aos::ShmEventLoop event_loop(&config.message());
-  y2022::localizer::Imu imu(&event_loop);
+  frc971::imu::Imu imu(&event_loop,
+                       y2022::constants::Values::DrivetrainEncoderToMeters(1));
 
   event_loop.SetRuntimeRealtimePriority(30);