Addressed shooter comments from Brian which were missed.
Change-Id: Ib5928b7906825c4bb29321e8892bcc49e8df78f6
diff --git a/y2017/control_loops/superstructure/shooter/shooter.cc b/y2017/control_loops/superstructure/shooter/shooter.cc
index c73a008..d30a45c 100644
--- a/y2017/control_loops/superstructure/shooter/shooter.cc
+++ b/y2017/control_loops/superstructure/shooter/shooter.cc
@@ -41,7 +41,10 @@
history_[history_position_] = current_position;
history_position_ = (history_position_ + 1) % kHistoryLength;
- dt_velocity_ = (current_position - last_position_) / 0.005;
+ dt_velocity_ = (current_position - last_position_) /
+ chrono::duration_cast<chrono::duration<double>>(
+ ::aos::controls::kLoopFrequency)
+ .count();
last_position_ = current_position;
}
@@ -104,7 +107,7 @@
status->avg_angular_velocity = average_angular_velocity_;
status->angular_velocity = X_hat_current_(1, 0);
- status->ready = std::abs(error_) < kTolerance && loop_->next_R(1, 0) > 1.0;
+ status->ready = ready_;
status->voltage_error = X_hat_current_(2, 0);
status->position_error = position_error_;