Add shuttle auto-aim
This change prepares the code for shuttle support by adding a new button,
shot table, and shot target location for the shuttle shot.
Signed-off-by: Filip Kujawa <filip.j.kujawa@gmail.com>
Change-Id: Ic70f1b0344fcab8316553cbda4a337cf8353dfd6
diff --git a/y2024/autonomous/autonomous_actor.cc b/y2024/autonomous/autonomous_actor.cc
index 6dd6f8a..19ff2b8 100644
--- a/y2024/autonomous/autonomous_actor.cc
+++ b/y2024/autonomous/autonomous_actor.cc
@@ -187,7 +187,7 @@
void AutonomousActor::Reset() {
set_intake_goal(control_loops::superstructure::IntakeGoal::NONE);
set_note_goal(control_loops::superstructure::NoteGoal::NONE);
- set_auto_aim(false);
+ set_auto_aim(control_loops::superstructure::AutoAimMode::NONE);
set_fire(false);
set_preloaded(false);
SendSuperstructureGoal();
@@ -494,7 +494,7 @@
}
void AutonomousActor::Aim() {
- set_auto_aim(true);
+ set_auto_aim(control_loops::superstructure::AutoAimMode::SPEAKER);
SendSuperstructureGoal();
}
diff --git a/y2024/autonomous/autonomous_actor.h b/y2024/autonomous/autonomous_actor.h
index 8abc8e3..e0b4f33 100644
--- a/y2024/autonomous/autonomous_actor.h
+++ b/y2024/autonomous/autonomous_actor.h
@@ -28,7 +28,9 @@
void set_note_goal(control_loops::superstructure::NoteGoal note_goal) {
note_goal_ = note_goal;
}
- void set_auto_aim(bool auto_aim) { auto_aim_ = auto_aim; }
+ void set_auto_aim(control_loops::superstructure::AutoAimMode auto_aim) {
+ auto_aim_ = auto_aim;
+ }
void set_fire(bool fire) { fire_ = fire; }
void set_preloaded(bool preloaded) { preloaded_ = preloaded; }
@@ -80,7 +82,8 @@
control_loops::superstructure::NoteGoal note_goal_ =
control_loops::superstructure::NoteGoal::CATAPULT;
- bool auto_aim_ = false;
+ control_loops::superstructure::AutoAimMode auto_aim_ =
+ control_loops::superstructure::AutoAimMode::NONE;
bool fire_ = false;
bool preloaded_ = false;
};