Fixed indexer error
The serializer would never reset after a timeout.
Change-Id: Ie919ee0d59f5c403dd3a0723437dbf2653d01030
diff --git a/y2017/control_loops/superstructure/indexer/indexer.cc b/y2017/control_loops/superstructure/indexer/indexer.cc
index cab9864..78e9528 100644
--- a/y2017/control_loops/superstructure/indexer/indexer.cc
+++ b/y2017/control_loops/superstructure/indexer/indexer.cc
@@ -177,12 +177,12 @@
monotonic_now > last_transition_time_ + kReverseMinTimeout) ||
monotonic_now > kReverseTimeout + last_transition_time_) {
state_ = State::RUNNING;
- last_transition_time_ = monotonic_now;
// Only reset if we got stuck going this way too.
if (monotonic_now > kReverseTimeout + last_transition_time_) {
indexer_.Reset();
}
+ last_transition_time_ = monotonic_now;
}
break;
}