Convert control loop tests over to simulated event loop
This makes it so that we properly only use ShmEventLoop for running in
realtime on a robot. Very nice.
Change-Id: I46b770b336f59e08cfaf28511b3bd5689f72fff1
diff --git a/y2014/control_loops/shooter/shooter.h b/y2014/control_loops/shooter/shooter.h
index a9a255b..01096a0 100644
--- a/y2014/control_loops/shooter/shooter.h
+++ b/y2014/control_loops/shooter/shooter.h
@@ -175,14 +175,14 @@
friend class testing::ShooterTest_RezeroWhileUnloading_Test;
// Enter state STATE_UNLOAD
- void Unload() {
+ void Unload(::aos::monotonic_clock::time_point monotonic_now) {
state_ = STATE_UNLOAD;
- unload_timeout_ = ::aos::monotonic_clock::now() + kUnloadTimeout;
+ unload_timeout_ = monotonic_now + kUnloadTimeout;
}
// Enter state STATE_LOAD
- void Load() {
+ void Load(::aos::monotonic_clock::time_point monotonic_now) {
state_ = STATE_LOAD;
- load_timeout_ = ::aos::monotonic_clock::now() + kLoadTimeout;
+ load_timeout_ = monotonic_now + kLoadTimeout;
}
::y2014::control_loops::ShooterQueue::Position last_position_;