Add Intake Superstructure
Signed-off-by: Niko Sohmers <nikolai@sohmers.com>
Change-Id: Iaaffa7e398bb10681a8aa2f3ae38d1e89503f159
diff --git a/y2024/control_loops/superstructure/superstructure.h b/y2024/control_loops/superstructure/superstructure.h
index b3ab37e..277ba73 100644
--- a/y2024/control_loops/superstructure/superstructure.h
+++ b/y2024/control_loops/superstructure/superstructure.h
@@ -21,10 +21,19 @@
class Superstructure
: public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
public:
+ using PotAndAbsoluteEncoderSubsystem =
+ ::frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystem<
+ ::frc971::zeroing::PotAndAbsoluteEncoderZeroingEstimator,
+ ::frc971::control_loops::PotAndAbsoluteEncoderProfiledJointStatus>;
+
explicit Superstructure(::aos::EventLoop *event_loop,
std::shared_ptr<const constants::Values> values,
const ::std::string &name = "/superstructure");
+ inline const PotAndAbsoluteEncoderSubsystem &intake_pivot() const {
+ return intake_pivot_;
+ }
+
double robot_velocity() const;
protected:
@@ -35,13 +44,15 @@
private:
std::shared_ptr<const constants::Values> values_;
frc971::constants::ConstantsFetcher<Constants> constants_fetcher_;
-
+ const Constants *robot_constants_;
aos::Fetcher<frc971::control_loops::drivetrain::Status>
drivetrain_status_fetcher_;
aos::Fetcher<aos::JoystickState> joystick_state_fetcher_;
aos::Alliance alliance_ = aos::Alliance::kInvalid;
+ PotAndAbsoluteEncoderSubsystem intake_pivot_;
+
DISALLOW_COPY_AND_ASSIGN(Superstructure);
};