blob: 3d7e6476adbf8a1a4d03119bcf4a21c4368e2867 [file] [log] [blame]
Ben Fredrickson6b5ba792015-01-25 17:14:40 -08001#ifndef FRC971_CONTROL_LOOPS_CLAW_H_
2#define FRC971_CONTROL_LOOPS_CLAW_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 "frc971/control_loops/claw/claw.q.h"
9#include "frc971/control_loops/claw/claw_motor_plant.h"
10
11namespace frc971 {
12namespace control_loops {
13
14class Claw
15 : public aos::controls::ControlLoop<control_loops::ClawQueue> {
16 public:
17 explicit Claw(
18 control_loops::ClawQueue *claw_queue = &control_loops::claw_queue);
19
20 // Control loop time step.
21 // Please figure out how to set dt from a common location
22 // Please decide the correct value
23 // Please use dt in your implementation so we can change looptimnig
24 // and be consistent with legacy
25 // And Brian please approve my code review as people are wait on
26 // these files to exist and they will be rewritten anyway
27 //static constexpr double dt;
28
29 protected:
30 virtual void RunIteration(
31 const control_loops::ClawQueue::Goal *goal,
32 const control_loops::ClawQueue::Position *position,
33 control_loops::ClawQueue::Output *output,
34 control_loops::ClawQueue::Status *status);
35
36 private:
37 // The state feedback control loop to talk to.
38 ::std::unique_ptr<StateFeedbackLoop<2, 1, 1>> claw_loop_;
39};
40
41} // namespace control_loops
42} // namespace frc971
43
44#endif // FRC971_CONTROL_LOOPS_CLAW_H_
45