Support selecting drivetrain side in TargetSelector

In doing this, I am thinking that we'll probably want to make the
hysteresis in the target selector *much* less aggressive so that we can
allow the manipulator to make mistakes.

Change-Id: I7c5047f75e7e0fd4eae168e1a40ffbb71c093f87
Signed-off-by: James Kuszmaul <jabukuszmaul@gmail.com>
diff --git a/y2023/joystick_reader.cc b/y2023/joystick_reader.cc
index 135c987..43962dd 100644
--- a/y2023/joystick_reader.cc
+++ b/y2023/joystick_reader.cc
@@ -31,11 +31,12 @@
 using frc971::input::driver_station::ControlBit;
 using frc971::input::driver_station::JoystickAxis;
 using frc971::input::driver_station::POVLocation;
-using y2023::control_loops::superstructure::RollerGoal;
-using y2023::control_loops::drivetrain::RowSelectionHint;
 using y2023::control_loops::drivetrain::GridSelectionHint;
+using y2023::control_loops::drivetrain::RowSelectionHint;
 using y2023::control_loops::drivetrain::SpotSelectionHint;
 using y2023::control_loops::drivetrain::TargetSelectorHint;
+using y2023::control_loops::superstructure::RollerGoal;
+using Side = frc971::control_loops::drivetrain::RobotSide;
 
 namespace y2023 {
 namespace input {
@@ -77,11 +78,6 @@
   CUBE = 2,
 };
 
-enum class Side {
-  FRONT = 0,
-  BACK = 1,
-};
-
 struct ButtonData {
   ButtonLocation button;
   std::optional<SpotSelectionHint> spot = std::nullopt;
@@ -439,8 +435,7 @@
       auto hint_builder = builder.MakeBuilder<TargetSelectorHint>();
       hint_builder.add_row(placing_row.value());
       hint_builder.add_spot(placing_spot.value());
-      // TODO: Add field to TargetSelector hint for forwards vs. backwards
-      // placement.
+      hint_builder.add_robot_side(CHECK_NOTNULL(current_setpoint_)->side);
       if (builder.Send(hint_builder.Finish()) != aos::RawSender::Error::kOk) {
         AOS_LOG(ERROR, "Sending target selector hint failed.\n");
       }