Austin Schuh | 87c1063 | 2017-02-05 19:02:17 -0800 | [diff] [blame] | 1 | #ifndef Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_ |
| 2 | #define Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_ |
| 3 | |
| 4 | #include <memory> |
| 5 | |
| 6 | #include "aos/common/controls/control_loop.h" |
| 7 | #include "frc971/control_loops/state_feedback_loop.h" |
| 8 | #include "y2017/control_loops/superstructure/hood/hood.h" |
Adam Snaider | 79900c2 | 2017-02-08 20:23:15 -0800 | [diff] [blame^] | 9 | #include "y2017/control_loops/superstructure/turret/turret.h" |
| 10 | #include "y2017/control_loops/superstructure/intake/intake.h" |
Austin Schuh | 87c1063 | 2017-02-05 19:02:17 -0800 | [diff] [blame] | 11 | #include "y2017/control_loops/superstructure/superstructure.q.h" |
| 12 | |
| 13 | namespace y2017 { |
| 14 | namespace control_loops { |
| 15 | namespace superstructure { |
| 16 | |
| 17 | class Superstructure |
| 18 | : public ::aos::controls::ControlLoop<control_loops::SuperstructureQueue> { |
| 19 | public: |
| 20 | explicit Superstructure( |
| 21 | control_loops::SuperstructureQueue *my_superstructure = |
| 22 | &control_loops::superstructure_queue); |
| 23 | |
Adam Snaider | cfe1306 | 2017-02-05 18:23:09 -0800 | [diff] [blame] | 24 | const hood::Hood &hood() const { return hood_; } |
Adam Snaider | 79900c2 | 2017-02-08 20:23:15 -0800 | [diff] [blame^] | 25 | const turret::Turret &turret() const { return turret_; } |
| 26 | const intake::Intake &intake() const { return intake_; } |
Austin Schuh | 87c1063 | 2017-02-05 19:02:17 -0800 | [diff] [blame] | 27 | |
| 28 | protected: |
| 29 | virtual void RunIteration( |
| 30 | const control_loops::SuperstructureQueue::Goal *unsafe_goal, |
| 31 | const control_loops::SuperstructureQueue::Position *position, |
| 32 | control_loops::SuperstructureQueue::Output *output, |
| 33 | control_loops::SuperstructureQueue::Status *status) override; |
| 34 | |
| 35 | private: |
| 36 | hood::Hood hood_; |
Adam Snaider | 79900c2 | 2017-02-08 20:23:15 -0800 | [diff] [blame^] | 37 | turret::Turret turret_; |
| 38 | intake::Intake intake_; |
Austin Schuh | 87c1063 | 2017-02-05 19:02:17 -0800 | [diff] [blame] | 39 | |
| 40 | DISALLOW_COPY_AND_ASSIGN(Superstructure); |
| 41 | }; |
| 42 | |
| 43 | } // namespace superstructure |
| 44 | } // namespace control_loops |
| 45 | } // namespace y2017 |
| 46 | |
| 47 | #endif // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_ |