Fix timeout handling on the controller side
Change-Id: I705d7e874c2e25dc9bc90357a2f086260465737e
diff --git a/motors/pistol_grip/controller.cc b/motors/pistol_grip/controller.cc
index dd3a4b8..6bdf0b3 100644
--- a/motors/pistol_grip/controller.cc
+++ b/motors/pistol_grip/controller.cc
@@ -328,6 +328,8 @@
wheel_haptic_current = 0.0f;
wheel_centering = true;
wheel_centering_scalar = 0.25f;
+ // Avoid wrapping back into the valid range.
+ last_command_time = time_subtract(micros(), kTimeout);
}
StateFeedbackPlant<3, 1, 1, float> *const trigger_plant =