Made zeroing test cases more flexible to deal with new constants. We now count the number of capped cycles and verify that it is low.
diff --git a/frc971/control_loops/wrist/wrist.h b/frc971/control_loops/wrist/wrist.h
index 250f536..55d14c8 100644
--- a/frc971/control_loops/wrist/wrist.h
+++ b/frc971/control_loops/wrist/wrist.h
@@ -27,6 +27,9 @@
explicit WristMotor(
control_loops::WristLoop *my_wrist = &control_loops::wrist);
+ // True if the goal was moved to avoid goal windup.
+ bool capped_goal() const { return capped_goal_; }
+
protected:
virtual void RunIteration(
const ::aos::control_loops::Goal *goal,
@@ -96,6 +99,9 @@
double wrist_hall_effect_start_angle_;
double wrist_zeroing_speed_;
+ // True if the zeroing goal was capped during this cycle.
+ bool capped_goal_;
+
DISALLOW_COPY_AND_ASSIGN(WristMotor);
};