Estimate the distributed clock with boots accounted for
Route the current boot through both the noncausal filter, and the
timestamp solver code. This gets us 1 step closer to exposing boots
to the user.
This stops before changing log_reader though. We still CHECK on the way
into the SimulatedEventLoopFactory that actually runs reading. This
felt like a reasonable intermediate point.
Change-Id: I85d0735c449a2aacf8cc457bdbcdbd667f1809ef
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/y2020/control_loops/drivetrain/localizer_test.cc b/y2020/control_loops/drivetrain/localizer_test.cc
index f3c3ebf..a1b6121 100644
--- a/y2020/control_loops/drivetrain/localizer_test.cc
+++ b/y2020/control_loops/drivetrain/localizer_test.cc
@@ -24,6 +24,7 @@
namespace drivetrain {
namespace testing {
+using aos::logger::BootTimestamp;
using frc971::control_loops::drivetrain::DrivetrainConfig;
using frc971::control_loops::drivetrain::Goal;
using frc971::control_loops::drivetrain::LocalizerControl;
@@ -133,13 +134,13 @@
event_loop_factory()->SetTimeConverter(&time_converter_);
CHECK_EQ(aos::configuration::GetNodeIndex(configuration(), roborio_), 6);
CHECK_EQ(aos::configuration::GetNodeIndex(configuration(), pi1_), 1);
- time_converter_.AddMonotonic({monotonic_clock::epoch() + kPiTimeOffset,
- monotonic_clock::epoch() + kPiTimeOffset,
- monotonic_clock::epoch() + kPiTimeOffset,
- monotonic_clock::epoch() + kPiTimeOffset,
- monotonic_clock::epoch() + kPiTimeOffset,
- monotonic_clock::epoch() + kPiTimeOffset,
- monotonic_clock::epoch()});
+ time_converter_.AddMonotonic({BootTimestamp::epoch() + kPiTimeOffset,
+ BootTimestamp::epoch() + kPiTimeOffset,
+ BootTimestamp::epoch() + kPiTimeOffset,
+ BootTimestamp::epoch() + kPiTimeOffset,
+ BootTimestamp::epoch() + kPiTimeOffset,
+ BootTimestamp::epoch() + kPiTimeOffset,
+ BootTimestamp::epoch()});
set_team_id(frc971::control_loops::testing::kTeamNumber);
set_battery_voltage(12.0);