Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 1 | #ifndef Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_ |
| 2 | #define Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_ |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 3 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 4 | #include "aos/controls/control_loop.h" |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 5 | |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 6 | #include "y2014_bot3/control_loops/rollers/rollers.q.h" |
| 7 | |
| 8 | namespace y2014_bot3 { |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 9 | namespace control_loops { |
| 10 | |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 11 | class Rollers : public aos::controls::ControlLoop<control_loops::RollersQueue> { |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 12 | public: |
| 13 | // Constructs a control loops which can take a rollers or defaults to the |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 14 | // rollers at ::2014_bot3::control_loops::rollers. |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 15 | explicit Rollers( |
| 16 | ::aos::EventLoop *event_loop, |
| 17 | const ::std::string &name = ".y2014_bot3.control_loops.rollers_queue"); |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 18 | |
| 19 | protected: |
| 20 | // Executes one cycle of the control loop. |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 21 | 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 Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 25 | }; |
| 26 | |
| 27 | } // namespace control_loops |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 28 | } // namespace y2014_bot3 |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 29 | |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 30 | #endif // Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_ |