Started work on creating a shooter action with Austin.
diff --git a/frc971/control_loops/shooter/shooter.cc b/frc971/control_loops/shooter/shooter.cc
index 11a11b9..036b466 100755
--- a/frc971/control_loops/shooter/shooter.cc
+++ b/frc971/control_loops/shooter/shooter.cc
@@ -157,6 +157,7 @@
LOG(ERROR, "Thought I would just check for null and die.\n");
return;
}
+ status->ready = false;
if (reset()) {
state_ = STATE_INITIALIZE;
@@ -397,6 +398,7 @@
// Wait until the brake is set, and a shot is requested or the shot power
// is changed.
if (Time::Now() > shooter_brake_set_time_) {
+ status->ready = true;
// We have waited long enough for the brake to set, turn the shooter
// control loop off.
shooter_loop_disable = true;
@@ -416,6 +418,7 @@
// TODO(austin): Do we want to set the brake here or after shooting?
// Depends on air usage.
+ status->ready = false;
LOG(DEBUG, "Preparing shot again.\n");
state_ = STATE_PREPARE_SHOT;
}
@@ -570,9 +573,6 @@
output->brake_piston = brake_piston_;
}
- status->done = ::std::abs(shooter_.absolute_position() -
- PowerToPosition(goal->shot_power)) < 0.004;
-
if (position) {
last_position_ = *position;
LOG(DEBUG, "pos > absolute: %f velocity: %f state= %d l= %d pp= %d, pd= %d "
diff --git a/frc971/control_loops/shooter/shooter.q b/frc971/control_loops/shooter/shooter.q
index 6310320..fd2ddd4 100755
--- a/frc971/control_loops/shooter/shooter.q
+++ b/frc971/control_loops/shooter/shooter.q
@@ -41,6 +41,7 @@
// Whether it's ready to shoot right now.
bool ready;
// Whether the plunger is in and out of the way of grabbing a ball.
+ // TODO(ben): Populate these!
bool cocked;
// How many times we've shot.
int32_t shots;