blob: 575d1d33e9ea0507b2ee62a81fdc39ea69982abc [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"
Austin Schuhcd3237a2017-02-18 14:19:26 -08009#include "y2017/control_loops/superstructure/indexer/indexer.h"
Adam Snaider79900c22017-02-08 20:23:15 -080010#include "y2017/control_loops/superstructure/intake/intake.h"
Tyler Chatow2737d2a2017-02-08 21:20:51 -080011#include "y2017/control_loops/superstructure/shooter/shooter.h"
Austin Schuhcd3237a2017-02-18 14:19:26 -080012#include "y2017/control_loops/superstructure/superstructure.q.h"
13#include "y2017/control_loops/superstructure/turret/turret.h"
Austin Schuh87c10632017-02-05 19:02:17 -080014
15namespace y2017 {
16namespace control_loops {
17namespace superstructure {
18
19class Superstructure
20 : public ::aos::controls::ControlLoop<control_loops::SuperstructureQueue> {
21 public:
22 explicit Superstructure(
23 control_loops::SuperstructureQueue *my_superstructure =
24 &control_loops::superstructure_queue);
25
Adam Snaidercfe13062017-02-05 18:23:09 -080026 const hood::Hood &hood() const { return hood_; }
Adam Snaider79900c22017-02-08 20:23:15 -080027 const turret::Turret &turret() const { return turret_; }
28 const intake::Intake &intake() const { return intake_; }
Austin Schuhcd3237a2017-02-18 14:19:26 -080029 const shooter::Shooter &shooter() const { return shooter_; }
30 const indexer::Indexer &indexer() const { return indexer_; }
Austin Schuh87c10632017-02-05 19:02:17 -080031
32 protected:
33 virtual void RunIteration(
34 const control_loops::SuperstructureQueue::Goal *unsafe_goal,
35 const control_loops::SuperstructureQueue::Position *position,
36 control_loops::SuperstructureQueue::Output *output,
37 control_loops::SuperstructureQueue::Status *status) override;
38
39 private:
40 hood::Hood hood_;
Adam Snaider79900c22017-02-08 20:23:15 -080041 turret::Turret turret_;
42 intake::Intake intake_;
Tyler Chatow2737d2a2017-02-08 21:20:51 -080043 shooter::Shooter shooter_;
Austin Schuhcd3237a2017-02-18 14:19:26 -080044 indexer::Indexer indexer_;
Austin Schuh87c10632017-02-05 19:02:17 -080045
46 DISALLOW_COPY_AND_ASSIGN(Superstructure);
47};
48
49} // namespace superstructure
50} // namespace control_loops
51} // namespace y2017
52
53#endif // Y2017_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_