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