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/y2016/control_loops/shooter/BUILD b/y2016/control_loops/shooter/BUILD
index a6cf134..6cae6fa 100644
--- a/y2016/control_loops/shooter/BUILD
+++ b/y2016/control_loops/shooter/BUILD
@@ -85,7 +85,7 @@
":shooter_plants",
":shooter_position_fbs",
":shooter_status_fbs",
- "//aos/controls:control_loop",
+ "//frc971/control_loops:control_loop",
],
)
@@ -102,7 +102,7 @@
":shooter_output_fbs",
":shooter_position_fbs",
":shooter_status_fbs",
- "//aos/controls:control_loop_test",
+ "//frc971/control_loops:control_loop_test",
"//aos/testing:googletest",
"//frc971/control_loops:state_feedback_loop",
"//frc971/control_loops:team_number_test_environment",
diff --git a/y2016/control_loops/shooter/shooter.cc b/y2016/control_loops/shooter/shooter.cc
index 5156a61..8b719c3 100644
--- a/y2016/control_loops/shooter/shooter.cc
+++ b/y2016/control_loops/shooter/shooter.cc
@@ -56,7 +56,7 @@
// Compute the distance moved over that time period.
const double avg_angular_velocity =
(history_[oldest_history_position] - history_[history_position_]) /
- (::aos::time::DurationInSeconds(::aos::controls::kLoopFrequency) *
+ (::aos::time::DurationInSeconds(::frc971::controls::kLoopFrequency) *
static_cast<double>(kHistoryLength - 1));
shooter_side_status_builder.add_avg_angular_velocity(avg_angular_velocity);
@@ -71,8 +71,8 @@
}
Shooter::Shooter(::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),
shots_(0),
last_pre_shot_timeout_(::aos::monotonic_clock::min_time) {}
diff --git a/y2016/control_loops/shooter/shooter.h b/y2016/control_loops/shooter/shooter.h
index 07fee84..c29869c 100644
--- a/y2016/control_loops/shooter/shooter.h
+++ b/y2016/control_loops/shooter/shooter.h
@@ -3,7 +3,7 @@
#include <memory>
-#include "aos/controls/control_loop.h"
+#include "frc971/control_loops/control_loop.h"
#include "aos/events/event_loop.h"
#include "aos/time/time.h"
#include "frc971/control_loops/state_feedback_loop.h"
@@ -58,7 +58,7 @@
};
class Shooter
- : public ::aos::controls::ControlLoop<Goal, Position, Status, Output> {
+ : public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
public:
explicit Shooter(::aos::EventLoop *event_loop,
const ::std::string &name = "/shooter");
diff --git a/y2016/control_loops/shooter/shooter_lib_test.cc b/y2016/control_loops/shooter/shooter_lib_test.cc
index c20526c..6934a75 100644
--- a/y2016/control_loops/shooter/shooter_lib_test.cc
+++ b/y2016/control_loops/shooter/shooter_lib_test.cc
@@ -1,11 +1,9 @@
-#include "y2016/control_loops/shooter/shooter.h"
-
#include <unistd.h>
#include <chrono>
#include <memory>
-#include "aos/controls/control_loop_test.h"
+#include "frc971/control_loops/control_loop_test.h"
#include "frc971/control_loops/team_number_test_environment.h"
#include "gtest/gtest.h"
#include "y2016/control_loops/shooter/shooter.h"
@@ -44,7 +42,6 @@
double voltage_offset_ = 0.0;
};
-
// Class which simulates the shooter and sends out queue messages with the
// position.
class ShooterSimulation {
@@ -116,10 +113,10 @@
bool first_ = true;
};
-class ShooterTest : public ::aos::testing::ControlLoopTest {
+class ShooterTest : public ::frc971::testing::ControlLoopTest {
protected:
ShooterTest()
- : ::aos::testing::ControlLoopTest(
+ : ::frc971::testing::ControlLoopTest(
aos::configuration::ReadConfig("y2016/config.json"),
chrono::microseconds(5000)),
test_event_loop_(MakeEventLoop("test")),