Use event_loop to set realtime priority on y2019 SolenoidWriter
The event loop wants to be the one who manages RT priority. It crashes
if Run is called while RT because setup work shouldn't be done while RT
Change-Id: I6da9d7b7dda21e640db9e35384422ef7579d347c
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2019/wpilib_interface.cc b/y2019/wpilib_interface.cc
index 00ec2ab..d644ee7 100644
--- a/y2019/wpilib_interface.cc
+++ b/y2019/wpilib_interface.cc
@@ -598,8 +598,7 @@
event_loop->MakeFetcher<::y2019::StatusLight>("/superstructure")),
pneumatics_to_log_sender_(
event_loop->MakeSender<::frc971::wpilib::PneumaticsToLog>("/aos")) {
- ::aos::SetCurrentThreadName("Solenoids");
- ::aos::SetCurrentThreadRealtimePriority(27);
+ event_loop_->SetRuntimeRealtimePriority(27);
event_loop_->AddPhasedLoop([this](int iterations) { Loop(iterations); },
::std::chrono::milliseconds(20),