blob: 9890871882dc05370530f520bda18e46b4ef2134 [file] [log] [blame]
Comran Morshed41ed7c22015-11-04 21:03:37 +00001#ifndef Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_
2#define Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_
Comran Morshede9b12922015-11-04 19:46:48 +00003
John Park33858a32018-09-28 23:05:48 -07004#include "aos/controls/control_loop.h"
Comran Morshede9b12922015-11-04 19:46:48 +00005
Comran Morshed41ed7c22015-11-04 21:03:37 +00006#include "y2014_bot3/control_loops/rollers/rollers.q.h"
7
8namespace y2014_bot3 {
Comran Morshede9b12922015-11-04 19:46:48 +00009namespace control_loops {
10
Comran Morshed41ed7c22015-11-04 21:03:37 +000011class Rollers : public aos::controls::ControlLoop<control_loops::RollersQueue> {
Comran Morshede9b12922015-11-04 19:46:48 +000012 public:
13 // Constructs a control loops which can take a rollers or defaults to the
Comran Morshed41ed7c22015-11-04 21:03:37 +000014 // rollers at ::2014_bot3::control_loops::rollers.
Austin Schuh55a13dc2019-01-27 22:39:03 -080015 explicit Rollers(
16 ::aos::EventLoop *event_loop,
17 const ::std::string &name = ".y2014_bot3.control_loops.rollers_queue");
Comran Morshede9b12922015-11-04 19:46:48 +000018
19 protected:
20 // Executes one cycle of the control loop.
Comran Morshed41ed7c22015-11-04 21:03:37 +000021 void RunIteration(const control_loops::RollersQueue::Goal *goal,
22 const control_loops::RollersQueue::Position *position,
23 control_loops::RollersQueue::Output *output,
24 control_loops::RollersQueue::Status *status) override;
Comran Morshede9b12922015-11-04 19:46:48 +000025};
26
27} // namespace control_loops
Comran Morshed41ed7c22015-11-04 21:03:37 +000028} // namespace y2014_bot3
Comran Morshede9b12922015-11-04 19:46:48 +000029
Comran Morshed41ed7c22015-11-04 21:03:37 +000030#endif // Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_