Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 1 | #ifndef Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_ |
| 2 | #define Y2018_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 "y2018/control_loops/superstructure/intake/intake.h" |
| 9 | #include "y2018/control_loops/superstructure/superstructure.q.h" |
| 10 | |
| 11 | namespace y2018 { |
| 12 | namespace control_loops { |
| 13 | namespace superstructure { |
| 14 | |
| 15 | class Superstructure |
| 16 | : public ::aos::controls::ControlLoop<control_loops::SuperstructureQueue> { |
| 17 | public: |
| 18 | explicit Superstructure( |
| 19 | control_loops::SuperstructureQueue *my_superstructure = |
| 20 | &control_loops::superstructure_queue); |
| 21 | |
| 22 | const intake::IntakeSide &intake_left() const { return intake_left_; } |
| 23 | const intake::IntakeSide &intake_right() const { return intake_right_; } |
| 24 | |
| 25 | protected: |
| 26 | virtual void RunIteration( |
| 27 | const control_loops::SuperstructureQueue::Goal *unsafe_goal, |
| 28 | const control_loops::SuperstructureQueue::Position *position, |
| 29 | control_loops::SuperstructureQueue::Output *output, |
| 30 | control_loops::SuperstructureQueue::Status *status) override; |
| 31 | |
| 32 | private: |
| 33 | intake::IntakeSide intake_left_; |
| 34 | intake::IntakeSide intake_right_; |
| 35 | |
| 36 | DISALLOW_COPY_AND_ASSIGN(Superstructure); |
| 37 | }; |
| 38 | |
| 39 | } // namespace superstructure |
| 40 | } // namespace control_loops |
| 41 | } // namespace y2018 |
| 42 | |
| 43 | #endif // Y2018_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_ |