blob: f67b372f7bc8940cc5e72057cefc71d3e620ff93 [file] [log] [blame]
Daniel Petticbc41122014-11-15 10:27:41 -08001#ifndef BOT3_CONTROL_LOOPS_ROLLERS_H_
2#define BOT3_CONTROL_LOOPS_ROLLERS_H_
3
4#include "aos/common/controls/control_loop.h"
5#include "bot3/control_loops/rollers/rollers.q.h"
6
7namespace bot3 {
8namespace control_loops {
9
10class RollersLoop
11 : public aos::controls::ControlLoop<control_loops::Rollers,
12 false, false, true> {
13 public:
14 // Constructs a control loops which can take a rollers or defaults to the
15 // rollers at ::bot3::control_loops::rollers.
16 explicit RollersLoop(
17 control_loops::Rollers *my_rollers = &control_loops::rollers)
18 : aos::controls::ControlLoop<control_loops::Rollers, false, false, true>(
19 my_rollers) {}
20
21 protected:
22 // Executes one cycle of the control loop.
23 virtual void RunIteration(
24 const control_loops::Rollers::Goal *goal,
25 const control_loops::Rollers::Position *position,
26 control_loops::Rollers::Output *output,
27 control_loops::Rollers::Status *status);
28};
29
30} // namespace control_loops
31} // namespace bot3
32
33#endif // BOT3_CONTROL_LOOPS_ROLLERS_H_