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 | |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame^] | 4 | #include "frc971/control_loops/control_loop.h" |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 5 | #include "y2014_bot3/control_loops/rollers/rollers_goal_generated.h" |
| 6 | #include "y2014_bot3/control_loops/rollers/rollers_output_generated.h" |
| 7 | #include "y2014_bot3/control_loops/rollers/rollers_position_generated.h" |
| 8 | #include "y2014_bot3/control_loops/rollers/rollers_status_generated.h" |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 9 | |
| 10 | namespace y2014_bot3 { |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 11 | namespace control_loops { |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 12 | namespace rollers { |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 13 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 14 | class Rollers |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame^] | 15 | : public frc971::controls::ControlLoop<Goal, Position, Status, Output> { |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 16 | public: |
| 17 | // 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] | 18 | // rollers at ::2014_bot3::control_loops::rollers. |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 19 | explicit Rollers(::aos::EventLoop *event_loop, |
| 20 | const ::std::string &name = "/rollers"); |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 21 | |
| 22 | protected: |
| 23 | // Executes one cycle of the control loop. |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 24 | void RunIteration(const Goal *goal, const Position *position, |
| 25 | aos::Sender<Output>::Builder *output, |
| 26 | aos::Sender<Status>::Builder *status) override; |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 27 | }; |
| 28 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 29 | } // namespace rollers |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 30 | } // namespace control_loops |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 31 | } // namespace y2014_bot3 |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 32 | |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 33 | #endif // Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_ |