Move aos/controls to frc971/control_loops

Also put what was aos/controls/control_loops.fbs in y2012/control_loops
because that's the only user.

Change-Id: I8f402b0708103077e135a41e55ef5e4f23681d87
Signed-off-by: James Kuszmaul <jabukuszmaul@gmail.com>
diff --git a/y2020/control_loops/superstructure/BUILD b/y2020/control_loops/superstructure/BUILD
index fbf6a57..1b24fc4 100644
--- a/y2020/control_loops/superstructure/BUILD
+++ b/y2020/control_loops/superstructure/BUILD
@@ -66,7 +66,7 @@
         ":superstructure_output_fbs",
         ":superstructure_position_fbs",
         ":superstructure_status_fbs",
-        "//aos/controls:control_loop",
+        "//frc971/control_loops:control_loop",
         "//aos/events:event_loop",
         "//frc971/control_loops:control_loops_fbs",
         "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
@@ -105,7 +105,7 @@
         ":superstructure_position_fbs",
         ":superstructure_status_fbs",
         "//aos:math",
-        "//aos/controls:control_loop_test",
+        "//frc971/control_loops:control_loop_test",
         "//aos/events/logging:log_writer",
         "//aos/testing:googletest",
         "//aos/time",
@@ -131,7 +131,7 @@
     deps = [
         ":superstructure_goal_fbs",
         ":superstructure_output_fbs",
-        "//aos/controls:control_loop",
+        "//frc971/control_loops:control_loop",
         "//frc971/control_loops:control_loops_fbs",
         "//frc971/control_loops:profiled_subsystem_fbs",
     ],
diff --git a/y2020/control_loops/superstructure/shooter/BUILD b/y2020/control_loops/superstructure/shooter/BUILD
index 0b65037..0694319 100644
--- a/y2020/control_loops/superstructure/shooter/BUILD
+++ b/y2020/control_loops/superstructure/shooter/BUILD
@@ -19,7 +19,7 @@
     target_compatible_with = ["@platforms//os:linux"],
     deps = [
         ":flywheel_controller",
-        "//aos/controls:control_loop",
+        "//frc971/control_loops:control_loop",
         "//frc971/control_loops:profiled_subsystem",
         "//y2020/control_loops/superstructure:superstructure_goal_fbs",
         "//y2020/control_loops/superstructure:superstructure_output_fbs",
@@ -38,7 +38,7 @@
     ],
     target_compatible_with = ["@platforms//os:linux"],
     deps = [
-        "//aos/controls:control_loop",
+        "//frc971/control_loops:control_loop",
         "//frc971/control_loops:profiled_subsystem",
         "//y2020/control_loops/superstructure:superstructure_goal_fbs",
         "//y2020/control_loops/superstructure:superstructure_status_fbs",
diff --git a/y2020/control_loops/superstructure/shooter/flywheel_controller.h b/y2020/control_loops/superstructure/shooter/flywheel_controller.h
index 4eafe47..df881c5 100644
--- a/y2020/control_loops/superstructure/shooter/flywheel_controller.h
+++ b/y2020/control_loops/superstructure/shooter/flywheel_controller.h
@@ -3,7 +3,7 @@
 
 #include <memory>
 
-#include "aos/controls/control_loop.h"
+#include "frc971/control_loops/control_loop.h"
 #include "aos/time/time.h"
 #include "frc971/control_loops/state_feedback_loop.h"
 #include "y2020/control_loops/superstructure/accelerator/integral_accelerator_plant.h"
diff --git a/y2020/control_loops/superstructure/shooter/shooter.h b/y2020/control_loops/superstructure/shooter/shooter.h
index 1a46949..539ecc9 100644
--- a/y2020/control_loops/superstructure/shooter/shooter.h
+++ b/y2020/control_loops/superstructure/shooter/shooter.h
@@ -1,7 +1,7 @@
 #ifndef Y2020_CONTROL_LOOPS_SHOOTER_SHOOTER_H_
 #define Y2020_CONTROL_LOOPS_SHOOTER_SHOOTER_H_
 
-#include "aos/controls/control_loop.h"
+#include "frc971/control_loops/control_loop.h"
 #include "frc971/control_loops/state_feedback_loop.h"
 #include "y2020/control_loops/superstructure/shooter/flywheel_controller.h"
 #include "y2020/control_loops/superstructure/superstructure_goal_generated.h"
diff --git a/y2020/control_loops/superstructure/superstructure.cc b/y2020/control_loops/superstructure/superstructure.cc
index 9a48095..ce816a0 100644
--- a/y2020/control_loops/superstructure/superstructure.cc
+++ b/y2020/control_loops/superstructure/superstructure.cc
@@ -12,8 +12,8 @@
 
 Superstructure::Superstructure(::aos::EventLoop *event_loop,
                                const ::std::string &name)
-    : aos::controls::ControlLoop<Goal, Position, Status, Output>(event_loop,
-                                                                 name),
+    : frc971::controls::ControlLoop<Goal, Position, Status, Output>(event_loop,
+                                                                    name),
       hood_(constants::GetValues().hood),
       intake_joint_(constants::GetValues().intake),
       turret_(constants::GetValues().turret.subsystem_params),
diff --git a/y2020/control_loops/superstructure/superstructure.h b/y2020/control_loops/superstructure/superstructure.h
index 4777aef..c03f7a7 100644
--- a/y2020/control_loops/superstructure/superstructure.h
+++ b/y2020/control_loops/superstructure/superstructure.h
@@ -1,7 +1,7 @@
 #ifndef y2020_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
 #define y2020_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
 
-#include "aos/controls/control_loop.h"
+#include "frc971/control_loops/control_loop.h"
 #include "aos/events/event_loop.h"
 #include "frc971/control_loops/drivetrain/drivetrain_status_generated.h"
 #include "frc971/input/joystick_state_generated.h"
@@ -19,7 +19,7 @@
 namespace superstructure {
 
 class Superstructure
-    : public ::aos::controls::ControlLoop<Goal, Position, Status, Output> {
+    : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
  public:
   explicit Superstructure(::aos::EventLoop *event_loop,
                           const ::std::string &name = "/superstructure");
diff --git a/y2020/control_loops/superstructure/superstructure_lib_test.cc b/y2020/control_loops/superstructure/superstructure_lib_test.cc
index f4704f5..22dd40e 100644
--- a/y2020/control_loops/superstructure/superstructure_lib_test.cc
+++ b/y2020/control_loops/superstructure/superstructure_lib_test.cc
@@ -3,9 +3,9 @@
 #include <chrono>
 #include <memory>
 
-#include "aos/controls/control_loop_test.h"
 #include "aos/events/logging/log_writer.h"
 #include "frc971/control_loops/capped_test_plant.h"
+#include "frc971/control_loops/control_loop_test.h"
 #include "frc971/control_loops/position_sensor_sim.h"
 #include "frc971/control_loops/team_number_test_environment.h"
 #include "gtest/gtest.h"
@@ -412,10 +412,10 @@
   float climber_voltage_ = 0.0f;
 };
 
-class SuperstructureTest : public ::aos::testing::ControlLoopTest {
+class SuperstructureTest : public ::frc971::testing::ControlLoopTest {
  protected:
   SuperstructureTest()
-      : ::aos::testing::ControlLoopTest(
+      : ::frc971::testing::ControlLoopTest(
             aos::configuration::ReadConfig("y2020/config.json"),
             chrono::microseconds(5050)),
         roborio_(aos::configuration::GetNode(configuration(), "roborio")),
@@ -978,21 +978,19 @@
                   superstructure_status_fetcher_->aimer()->turret_velocity());
 }
 
-
-
 // Test a manual goal
 TEST_P(SuperstructureAllianceTest, ShooterInterpolationManualGoal) {
   SetEnabled(true);
   WaitUntilZeroed();
 
   {
-     auto builder = superstructure_goal_sender_.MakeBuilder();
+    auto builder = superstructure_goal_sender_.MakeBuilder();
 
     auto shooter_goal = CreateShooterGoal(*builder.fbb(), 400.0, 500.0);
 
     flatbuffers::Offset<StaticZeroingSingleDOFProfiledSubsystemGoal>
-      hood_offset = CreateStaticZeroingSingleDOFProfiledSubsystemGoal(
-          *builder.fbb(), constants::Values::kHoodRange().lower);
+        hood_offset = CreateStaticZeroingSingleDOFProfiledSubsystemGoal(
+            *builder.fbb(), constants::Values::kHoodRange().lower);
 
     Goal::Builder goal_builder = builder.MakeBuilder<Goal>();
 
@@ -1022,7 +1020,6 @@
               constants::Values::kHoodRange().lower, 0.001);
 }
 
-
 // Test an out of range value with auto tracking
 TEST_P(SuperstructureAllianceTest, ShooterInterpolationOutOfRange) {
   SetEnabled(true);
@@ -1086,11 +1083,8 @@
                    0.0);
   EXPECT_NEAR(superstructure_status_fetcher_->hood()->position(),
               constants::Values::kHoodRange().upper, 0.001);
-
 }
 
-
-
 TEST_P(SuperstructureAllianceTest, ShooterInterpolationInRange) {
   SetEnabled(true);
   const frc971::control_loops::Pose target = turret::OuterPortPose(GetParam());
@@ -1160,9 +1154,9 @@
 }
 
 INSTANTIATE_TEST_SUITE_P(ShootAnyAlliance, SuperstructureAllianceTest,
-                        ::testing::Values(aos::Alliance::kRed,
-                                          aos::Alliance::kBlue,
-                                          aos::Alliance::kInvalid));
+                         ::testing::Values(aos::Alliance::kRed,
+                                           aos::Alliance::kBlue,
+                                           aos::Alliance::kInvalid));
 
 }  // namespace testing
 }  // namespace superstructure