Convert joystick_reader over to event loops.
Change-Id: I97b78254b0fc96853f162b66ef75ec97a6c9c50b
diff --git a/y2016/joystick_reader.cc b/y2016/joystick_reader.cc
index 8f99e4c..6887a53 100644
--- a/y2016/joystick_reader.cc
+++ b/y2016/joystick_reader.cc
@@ -71,8 +71,9 @@
class Reader : public ::aos::input::JoystickInput {
public:
- Reader()
- : is_high_gear_(true),
+ Reader(::aos::EventLoop *event_loop)
+ : ::aos::input::JoystickInput(event_loop),
+ is_high_gear_(true),
intake_goal_(0.0),
shoulder_goal_(M_PI / 2.0),
wrist_goal_(0.0),
@@ -498,7 +499,8 @@
int main() {
::aos::Init(-1);
- ::y2016::input::joysticks::Reader reader;
+ ::aos::ShmEventLoop event_loop;
+ ::y2016::input::joysticks::Reader reader(&event_loop);
reader.Run();
::aos::Cleanup();
}