Add remote timestamps and queue_index to context
This gives us the knobs to expose the remote timestamps and queue_index
to anything receiving the events. The first use case is the logger. It
can now log forwarded entries *without* having to make the
message_gateway responsible for logging this data.
Change-Id: Ie34dd040d270f4fa90ecd6e463069e1adca1818a
diff --git a/y2019/vision/server/server.cc b/y2019/vision/server/server.cc
index 99a3727..56aa289 100644
--- a/y2019/vision/server/server.cc
+++ b/y2019/vision/server/server.cc
@@ -165,7 +165,7 @@
&camera_frames) {
while (drivetrain_status_fetcher.FetchNext()) {
DrivetrainPosition drivetrain_position{
- drivetrain_status_fetcher.context().monotonic_sent_time,
+ drivetrain_status_fetcher.context().monotonic_event_time,
drivetrain_status_fetcher->x(), drivetrain_status_fetcher->y(),
drivetrain_status_fetcher->theta()};
diff --git a/y2019/wpilib_interface.cc b/y2019/wpilib_interface.cc
index 097f011..b6d432f 100644
--- a/y2019/wpilib_interface.cc
+++ b/y2019/wpilib_interface.cc
@@ -661,7 +661,7 @@
// Flash the red light slowly.
StatusLightT color;
if (!status_light_fetcher_.get() ||
- status_light_fetcher_.context().monotonic_sent_time +
+ status_light_fetcher_.context().monotonic_event_time +
chrono::milliseconds(100) <
event_loop_->monotonic_now()) {
color.red = 0.0;