Remove the final users of robot_state and joystick_state
This means we can remove them from the .q file.
Change-Id: Iefded3cf4537b2635341f3248c5f50af1534a241
diff --git a/frc971/wpilib/loop_output_handler.h b/frc971/wpilib/loop_output_handler.h
index 27c96e7..ff8415f 100644
--- a/frc971/wpilib/loop_output_handler.h
+++ b/frc971/wpilib/loop_output_handler.h
@@ -4,6 +4,8 @@
#include <atomic>
#include <chrono>
+#include "aos/events/event-loop.h"
+#include "aos/robot_state/robot_state.q.h"
#include "aos/scoped/scoped_fd.h"
#include "aos/time/time.h"
#include "aos/util/log_interval.h"
@@ -22,6 +24,7 @@
class LoopOutputHandler {
public:
LoopOutputHandler(
+ ::aos::EventLoop *event_loop,
::std::chrono::nanoseconds timeout = ::std::chrono::milliseconds(100));
void Quit() { run_ = false; }
@@ -43,6 +46,9 @@
// after Quit is called.
virtual void Stop() = 0;
+ // Returns a pointer to the event loop.
+ ::aos::EventLoop *event_loop() { return event_loop_; }
+
private:
// The thread that actually contains a timerfd to implement timeouts. The
// idea is to have a timerfd that is repeatedly set to the timeout expiration
@@ -72,6 +78,8 @@
::std::atomic<bool> run_{true};
};
+ ::aos::EventLoop *event_loop_;
+ ::aos::Fetcher<::aos::JoystickState> joystick_state_fetcher_;
Watchdog watchdog_;
::std::atomic<bool> run_{true};