Add shooter pneumatics.
Change-Id: I2568af8b2836b17d950c24da00c830f0c774f1b7
diff --git a/y2016/control_loops/shooter/shooter.cc b/y2016/control_loops/shooter/shooter.cc
index 6550fc2..0e8f3a5 100644
--- a/y2016/control_loops/shooter/shooter.cc
+++ b/y2016/control_loops/shooter/shooter.cc
@@ -92,6 +92,11 @@
if (output) {
output->voltage_left = left_.voltage();
output->voltage_right = right_.voltage();
+
+ if (goal) {
+ output->clamp_open = goal->clamp_open;
+ output->push_to_shooter = goal->push_to_shooter;
+ }
}
}
diff --git a/y2016/control_loops/shooter/shooter.q b/y2016/control_loops/shooter/shooter.q
index af3f064..e0b4531 100644
--- a/y2016/control_loops/shooter/shooter.q
+++ b/y2016/control_loops/shooter/shooter.q
@@ -21,6 +21,9 @@
message Goal {
// Angular velocity goals in radians/second.
double angular_velocity;
+
+ bool clamp_open; // True to release our clamp on the ball.
+ bool push_to_shooter; // True to push the ball into the shooter.
};
message Position {
@@ -44,6 +47,10 @@
// Voltage in volts of the left and right shooter motors.
double voltage_left;
double voltage_right;
+
+ // See comments on the identical fields in Goal for details.
+ bool clamp_open;
+ bool push_to_shooter;
};
queue Goal goal;