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