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/y2017/control_loops/superstructure/superstructure.cc b/y2017/control_loops/superstructure/superstructure.cc
index 29886e2..a0448fd 100644
--- a/y2017/control_loops/superstructure/superstructure.cc
+++ b/y2017/control_loops/superstructure/superstructure.cc
@@ -138,7 +138,7 @@
status->fbb());
flatbuffers::Offset<ShooterStatus> shooter_offset = shooter_.Iterate(
unsafe_goal != nullptr ? &shooter_goal : nullptr,
- position->theta_shooter(), position_context().monotonic_sent_time,
+ position->theta_shooter(), position_context().monotonic_event_time,
output != nullptr ? &(output_struct.voltage_shooter) : nullptr,
status->fbb());
diff --git a/y2017/control_loops/superstructure/vision_time_adjuster.cc b/y2017/control_loops/superstructure/vision_time_adjuster.cc
index 7db653e..6684546 100644
--- a/y2017/control_loops/superstructure/vision_time_adjuster.cc
+++ b/y2017/control_loops/superstructure/vision_time_adjuster.cc
@@ -116,7 +116,7 @@
if (drivetrain_status_fetcher_.Fetch()) {
const auto &position = drivetrain_status_fetcher_.get();
DrivetrainAngle new_position{
- .time = drivetrain_status_fetcher_.context().monotonic_sent_time,
+ .time = drivetrain_status_fetcher_.context().monotonic_event_time,
.left = position->estimated_left_position(),
.right = position->estimated_right_position()};
drivetrain_data_.Push(new_position);