| #ifndef Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_ |
| #define Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_ |
| |
| #include <memory> |
| |
| #include "aos/common/controls/control_loop.h" |
| #include "frc971/control_loops/state_feedback_loop.h" |
| #include "y2017/control_loops/superstructure/hood/hood.h" |
| #include "y2017/control_loops/superstructure/indexer/indexer.h" |
| #include "y2017/control_loops/superstructure/intake/intake.h" |
| #include "y2017/control_loops/superstructure/shooter/shooter.h" |
| #include "y2017/control_loops/superstructure/superstructure.q.h" |
| #include "y2017/control_loops/superstructure/turret/turret.h" |
| |
| namespace y2017 { |
| namespace control_loops { |
| namespace superstructure { |
| |
| class Superstructure |
| : public ::aos::controls::ControlLoop<control_loops::SuperstructureQueue> { |
| public: |
| explicit Superstructure( |
| control_loops::SuperstructureQueue *my_superstructure = |
| &control_loops::superstructure_queue); |
| |
| const hood::Hood &hood() const { return hood_; } |
| const turret::Turret &turret() const { return turret_; } |
| const intake::Intake &intake() const { return intake_; } |
| const shooter::Shooter &shooter() const { return shooter_; } |
| const indexer::Indexer &indexer() const { return indexer_; } |
| |
| protected: |
| virtual void RunIteration( |
| const control_loops::SuperstructureQueue::Goal *unsafe_goal, |
| const control_loops::SuperstructureQueue::Position *position, |
| control_loops::SuperstructureQueue::Output *output, |
| control_loops::SuperstructureQueue::Status *status) override; |
| |
| private: |
| hood::Hood hood_; |
| turret::Turret turret_; |
| intake::Intake intake_; |
| shooter::Shooter shooter_; |
| indexer::Indexer indexer_; |
| |
| DISALLOW_COPY_AND_ASSIGN(Superstructure); |
| }; |
| |
| } // namespace superstructure |
| } // namespace control_loops |
| } // namespace y2017 |
| |
| #endif // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_ |