Moved ProfileParameters to //frc971/control_loops/control_loops.q
Change-Id: I2326ed8cd26a4f50634f71c8a3126c10c8c1f4e4
diff --git a/frc971/control_loops/control_loops.q b/frc971/control_loops/control_loops.q
index 34b2467..9c31443 100644
--- a/frc971/control_loops/control_loops.q
+++ b/frc971/control_loops/control_loops.q
@@ -63,3 +63,11 @@
int32_t negedge_count;
double posedge_value;
};
+
+// Parameters for the motion profiles.
+struct ProfileParameters {
+ // Maximum velocity for the profile.
+ float max_velocity;
+ // Maximum acceleration for the profile.
+ float max_acceleration;
+};
diff --git a/frc971/control_loops/drivetrain/BUILD b/frc971/control_loops/drivetrain/BUILD
index 73fb9a5..72a32cc 100644
--- a/frc971/control_loops/drivetrain/BUILD
+++ b/frc971/control_loops/drivetrain/BUILD
@@ -22,6 +22,7 @@
],
deps = [
'//aos/common/controls:control_loop_queues',
+ '//frc971/control_loops:queues',
],
)
diff --git a/frc971/control_loops/drivetrain/drivetrain.q b/frc971/control_loops/drivetrain/drivetrain.q
index 3ef64bf..4723aef 100644
--- a/frc971/control_loops/drivetrain/drivetrain.q
+++ b/frc971/control_loops/drivetrain/drivetrain.q
@@ -1,14 +1,7 @@
package frc971.control_loops;
import "aos/common/controls/control_loops.q";
-
-// Parameters for the motion profiles.
-struct ProfileParameters {
- // Maximum velocity for the profile.
- float max_velocity;
- // Maximum acceleration for the profile.
- float max_acceleration;
-};
+import "frc971/control_loops/control_loops.q";
// For logging information about what the code is doing with the shifters.
struct GearLogging {
@@ -73,8 +66,8 @@
// Motion profile parameters.
// The control loop will profile if these are all non-zero.
- ProfileParameters linear;
- ProfileParameters angular;
+ .frc971.ProfileParameters linear;
+ .frc971.ProfileParameters angular;
};
message Position {
diff --git a/y2016/actors/autonomous_actor.cc b/y2016/actors/autonomous_actor.cc
index ad361bb..ccccdd7 100644
--- a/y2016/actors/autonomous_actor.cc
+++ b/y2016/actors/autonomous_actor.cc
@@ -10,7 +10,7 @@
namespace y2016 {
namespace actors {
-using ::frc971::control_loops::ProfileParameters;
+using ::frc971::ProfileParameters;
using ::frc971::control_loops::drivetrain_queue;
namespace {
diff --git a/y2016/actors/autonomous_actor.h b/y2016/actors/autonomous_actor.h
index a4ace8a..d7d7e65 100644
--- a/y2016/actors/autonomous_actor.h
+++ b/y2016/actors/autonomous_actor.h
@@ -26,8 +26,8 @@
void WaitUntilDoneOrCanceled(::std::unique_ptr<aos::common::actions::Action>
action);
void StartDrive(double distance, double angle,
- ::frc971::control_loops::ProfileParameters linear,
- ::frc971::control_loops::ProfileParameters angular);
+ ::frc971::ProfileParameters linear,
+ ::frc971::ProfileParameters angular);
// Waits for the drive motion to finish. Returns true if it succeeded, and
// false if it cancels.
bool WaitForDriveDone();