Removed gyro_part_id queue.
Converted to an event loop.
Change-Id: I25bab753e898f8420d58ace2606bde42d9f4f780
diff --git a/frc971/wpilib/gyro_sender.cc b/frc971/wpilib/gyro_sender.cc
index 121665f..925588e 100644
--- a/frc971/wpilib/gyro_sender.cc
+++ b/frc971/wpilib/gyro_sender.cc
@@ -27,7 +27,9 @@
GyroSender::GyroSender(::aos::EventLoop *event_loop)
: event_loop_(event_loop),
joystick_state_fetcher_(event_loop_->MakeFetcher<::aos::JoystickState>(
- ".aos.joystick_state")) {
+ ".aos.joystick_state")),
+ uid_sender_(event_loop_->MakeSender<::frc971::sensors::Uid>(
+ ".frc971.sensors.gyro_part_id")) {
PCHECK(
system("ps -ef | grep '\\[spi0\\]' | awk '{print $1}' | xargs chrt -f -p "
"33") == 0);
@@ -42,7 +44,7 @@
}
LOG(INFO, "gyro initialized successfully\n");
- auto message = ::frc971::sensors::gyro_part_id.MakeMessage();
+ auto message = uid_sender_.MakeMessage();
message->uid = gyro_.ReadPartID();
LOG_STRUCT(INFO, "gyro ID", *message);
message.Send();