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" |
Tyler Chatow | 2737d2a | 2017-02-08 21:20:51 -0800 | [diff] [blame] | 12 | #include "y2017/control_loops/superstructure/shooter/shooter.h" |
Austin Schuh | 87c1063 | 2017-02-05 19:02:17 -0800 | [diff] [blame] | 13 | |
| 14 | namespace y2017 { |
| 15 | namespace control_loops { |
| 16 | namespace superstructure { |
| 17 | |
| 18 | class Superstructure |
| 19 | : public ::aos::controls::ControlLoop<control_loops::SuperstructureQueue> { |
| 20 | public: |
| 21 | explicit Superstructure( |
| 22 | control_loops::SuperstructureQueue *my_superstructure = |
| 23 | &control_loops::superstructure_queue); |
| 24 | |
Adam Snaider | cfe1306 | 2017-02-05 18:23:09 -0800 | [diff] [blame] | 25 | const hood::Hood &hood() const { return hood_; } |
Adam Snaider | 79900c2 | 2017-02-08 20:23:15 -0800 | [diff] [blame] | 26 | const turret::Turret &turret() const { return turret_; } |
| 27 | const intake::Intake &intake() const { return intake_; } |
Austin Schuh | 87c1063 | 2017-02-05 19:02:17 -0800 | [diff] [blame] | 28 | |
| 29 | protected: |
| 30 | virtual void RunIteration( |
| 31 | const control_loops::SuperstructureQueue::Goal *unsafe_goal, |
| 32 | const control_loops::SuperstructureQueue::Position *position, |
| 33 | control_loops::SuperstructureQueue::Output *output, |
| 34 | control_loops::SuperstructureQueue::Status *status) override; |
| 35 | |
| 36 | private: |
| 37 | hood::Hood hood_; |
Adam Snaider | 79900c2 | 2017-02-08 20:23:15 -0800 | [diff] [blame] | 38 | turret::Turret turret_; |
| 39 | intake::Intake intake_; |
Tyler Chatow | 2737d2a | 2017-02-08 21:20:51 -0800 | [diff] [blame] | 40 | shooter::Shooter shooter_; |
Austin Schuh | 87c1063 | 2017-02-05 19:02:17 -0800 | [diff] [blame] | 41 | |
| 42 | DISALLOW_COPY_AND_ASSIGN(Superstructure); |
| 43 | }; |
| 44 | |
| 45 | } // namespace superstructure |
| 46 | } // namespace control_loops |
| 47 | } // namespace y2017 |
| 48 | |
| 49 | #endif // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_ |