blob: 4dc99a53142c48a42afca1440af100b348ff177a [file] [log] [blame]
Austin Schuh87c10632017-02-05 19:02:17 -08001#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 Snaider79900c22017-02-08 20:23:15 -08009#include "y2017/control_loops/superstructure/turret/turret.h"
10#include "y2017/control_loops/superstructure/intake/intake.h"
Austin Schuh87c10632017-02-05 19:02:17 -080011#include "y2017/control_loops/superstructure/superstructure.q.h"
Tyler Chatow2737d2a2017-02-08 21:20:51 -080012#include "y2017/control_loops/superstructure/shooter/shooter.h"
Austin Schuh87c10632017-02-05 19:02:17 -080013
14namespace y2017 {
15namespace control_loops {
16namespace superstructure {
17
18class 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 Snaidercfe13062017-02-05 18:23:09 -080025 const hood::Hood &hood() const { return hood_; }
Adam Snaider79900c22017-02-08 20:23:15 -080026 const turret::Turret &turret() const { return turret_; }
27 const intake::Intake &intake() const { return intake_; }
Austin Schuh87c10632017-02-05 19:02:17 -080028
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 Snaider79900c22017-02-08 20:23:15 -080038 turret::Turret turret_;
39 intake::Intake intake_;
Tyler Chatow2737d2a2017-02-08 21:20:51 -080040 shooter::Shooter shooter_;
Austin Schuh87c10632017-02-05 19:02:17 -080041
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_