Add suction support including auto reversing
We push the disc off the suction cup for a second after releasing.
Also, slow the pump down once we have pulled a vacuum.
Change-Id: I83a8994828f143bef176f069f0f2d5785fde4931
diff --git a/y2019/control_loops/superstructure/superstructure.h b/y2019/control_loops/superstructure/superstructure.h
index c3e53f2..9879e17 100644
--- a/y2019/control_loops/superstructure/superstructure.h
+++ b/y2019/control_loops/superstructure/superstructure.h
@@ -40,12 +40,16 @@
SuperstructureQueue::Status *status) override;
private:
+ void HandleSuction(const SuctionGoal *unsafe_goal, float suction_pressure,
+ SuperstructureQueue::Output *output, bool *has_piece);
+
PotAndAbsoluteEncoderSubsystem elevator_;
PotAndAbsoluteEncoderSubsystem wrist_;
AbsoluteEncoderSubsystem intake_;
PotAndAbsoluteEncoderSubsystem stilts_;
CollisionAvoidance collision_avoidance_;
+ int vacuum_count_ = 0;
static constexpr double kMinIntakeAngleForRollers = -0.7;