fixed weird ways of fetching stuff
diff --git a/frc971/actions/shoot_action.cc b/frc971/actions/shoot_action.cc
index 211d81f..1d3b4a1 100644
--- a/frc971/actions/shoot_action.cc
+++ b/frc971/actions/shoot_action.cc
@@ -103,9 +103,7 @@
}
bool ClawIsReady() {
- if (!control_loops::claw_queue_group.goal.FetchLatest()) {
- control_loops::claw_queue_group.goal.FetchLatest();
- }
+ control_loops::claw_queue_group.goal.FetchLatest();
bool ans =
control_loops::claw_queue_group.status->zeroed &&
@@ -117,9 +115,8 @@
control_loops::claw_queue_group.goal->separation_angle) <
0.4);
if (!ans) {
- LOG(INFO,
- "Claw is ready %d zeroed %d bottom_velocity %f bottom %f sep %f\n", ans,
- control_loops::claw_queue_group.status->zeroed,
+ LOG(INFO, "Claw is %sready zeroed %d bottom_velocity %f bottom %f sep %f\n",
+ ans ? "" : "not ", control_loops::claw_queue_group.status->zeroed,
::std::abs(control_loops::claw_queue_group.status->bottom_velocity),
::std::abs(control_loops::claw_queue_group.status->bottom -
control_loops::claw_queue_group.goal->bottom_angle),
@@ -131,7 +128,7 @@
bool ShooterIsReady() {
control_loops::shooter_queue_group.goal.FetchLatest();
- control_loops::shooter_queue_group.status.FetchLatest();
+
if (control_loops::shooter_queue_group.status->ready) {
LOG(INFO, "Power error is %f - %f -> %f, ready %d\n",
control_loops::shooter_queue_group.status->hard_stop_power,