Add basic shooting-on-the-fly implementation
This makes a bunch of simplistic assumptions about how the dynamics of
the shot work, but it'll probably get us pretty close initially and is
easy to implement and understand as-is.
Change-Id: I2ee8fa9d2681e4dec0e490395027d8860f58e521
diff --git a/y2020/control_loops/superstructure/superstructure.cc b/y2020/control_loops/superstructure/superstructure.cc
index 8fb2ca1..d5468e9 100644
--- a/y2020/control_loops/superstructure/superstructure.cc
+++ b/y2020/control_loops/superstructure/superstructure.cc
@@ -43,11 +43,12 @@
if (joystick_state_fetcher_.Fetch()) {
alliance = joystick_state_fetcher_->alliance();
}
- const turret::Aimer::Mode mode =
+ const turret::Aimer::WrapMode mode =
(unsafe_goal != nullptr && unsafe_goal->shooting())
- ? turret::Aimer::Mode::kAvoidWrapping
- : turret::Aimer::Mode::kAvoidEdges;
- aimer_.Update(drivetrain_status_fetcher_.get(), alliance, mode);
+ ? turret::Aimer::WrapMode::kAvoidWrapping
+ : turret::Aimer::WrapMode::kAvoidEdges;
+ aimer_.Update(drivetrain_status_fetcher_.get(), alliance, mode,
+ turret::Aimer::ShotMode::kShootOnTheFly);
}
const flatbuffers::Offset<AimerStatus> aimer_status_offset =