blob: 99a75e3a5b548f47e40515c460870e21a8da0be3 [file] [log] [blame]
Sabina Davisb6b987d2017-10-22 20:50:21 -07001#ifndef Y2017_BOT3_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
2#define Y2017_BOT3_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
3
4#include <memory>
5
John Park33858a32018-09-28 23:05:48 -07006#include "aos/controls/control_loop.h"
7#include "aos/util/trapezoid_profile.h"
Sabina Davisb6b987d2017-10-22 20:50:21 -07008#include "frc971/control_loops/state_feedback_loop.h"
9#include "frc971/zeroing/zeroing.h"
10#include "y2017_bot3/control_loops/superstructure/superstructure.q.h"
11
12namespace y2017_bot3 {
13namespace control_loops {
14namespace superstructure {
15
16class 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 static constexpr double kOperatingVoltage = 12.0;
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 DISALLOW_COPY_AND_ASSIGN(Superstructure);
34};
35
36} // namespace superstructure
37} // namespace control_loops
38} // namespace y2017_bot3
39
40#endif // Y2017_BOT3_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_