Add arm/elevator profile instances into the control loop.
This is heavily based upon Austin's corresponding changes to the claw:
bd5308ac4e9715a3d73d0dbaec9eb604ea16f44b
Change-Id: I205038c8807c52cd1aa4efa5abced6f696152d54
diff --git a/frc971/control_loops/fridge/fridge.h b/frc971/control_loops/fridge/fridge.h
index e9cbaa5..5761c79 100644
--- a/frc971/control_loops/fridge/fridge.h
+++ b/frc971/control_loops/fridge/fridge.h
@@ -4,6 +4,7 @@
#include <memory>
#include "aos/common/controls/control_loop.h"
+#include "aos/common/util/trapezoid_profile.h"
#include "frc971/control_loops/state_feedback_loop.h"
#include "frc971/control_loops/fridge/fridge.q.h"
#include "frc971/zeroing/zeroing.h"
@@ -112,6 +113,8 @@
// Corrects the Observer with the current position.
void Correct();
+ double UseUnlessZero(double target_value, double default_value);
+
// The state feedback control loop or loops to talk to.
::std::unique_ptr<CappedStateFeedbackLoop<5>> arm_loop_;
::std::unique_ptr<CappedStateFeedbackLoop<4>> elevator_loop_;
@@ -140,6 +143,9 @@
State last_state_ = UNINITIALIZED;
control_loops::FridgeQueue::Position current_position_;
+
+ aos::util::TrapezoidProfile arm_profile_;
+ aos::util::TrapezoidProfile elevator_profile_;
};
} // namespace control_loops