Add rollers control loop.
The rollers are a separate control loop because Austin wanted
Comran to get practice writing them.
This change contains modifications that Comran made to the rollers
control loop. There was a lot of cleaning up and fixing by me
as well.
Change-Id: I3d012fb8a9652c0b85ed27f5d23fe7d63bb977ce
diff --git a/bot3/control_loops/rollers/rollers.q b/bot3/control_loops/rollers/rollers.q
new file mode 100644
index 0000000..5abb488
--- /dev/null
+++ b/bot3/control_loops/rollers/rollers.q
@@ -0,0 +1,40 @@
+package bot3.control_loops;
+
+import "aos/common/controls/control_loops.q";
+
+queue_group Rollers {
+ implements aos.control_loops.ControlLoop;
+
+ message Goal {
+ // -1 = back intake, 1 = front intake, all else = stationary.
+ int16_t intake;
+ // -1 = backwards, 1 = forwards, all else = stationary.
+ int16_t low_spit;
+ // Whether we want the human player load function.
+ bool human_player;
+ };
+
+ message Position {};
+
+ message Output {
+ // Positive voltage = intaking, Negative = spitting.
+ double front_intake_voltage;
+ double back_intake_voltage;
+ // Voltage for the low goal rollers.
+ // Positive voltage = ball towards back, Negative = ball towards front.
+ double low_goal_voltage;
+
+ // Whether the front and back intake pistons are extended.
+ bool front_extended;
+ bool back_extended;
+ };
+
+ message Status {};
+
+ queue Goal goal;
+ queue Position position;
+ queue Output output;
+ queue Status status;
+};
+
+queue_group Rollers rollers;