Factor out parts of drivetrain_lib_test
I want to run some year-specific tests with the drivetrain.
Change-Id: I12989b2ec662f7f6b0f0392d7bcf981c6e176e46
diff --git a/aos/controls/control_loop_test.h b/aos/controls/control_loop_test.h
index e88b1b7..66fb174 100644
--- a/aos/controls/control_loop_test.h
+++ b/aos/controls/control_loop_test.h
@@ -80,9 +80,10 @@
}
// Simulates everything that happens during 1 loop time step.
- void SimulateTimestep(bool enabled) {
+ void SimulateTimestep(bool enabled,
+ ::std::chrono::nanoseconds dt = kTimeTick) {
SendMessages(enabled);
- TickTime();
+ TickTime(dt);
}
// Simulate a reset of the process reading sensors, which tells loops that all