blob: 3d08f598b7e5fc88809f6eda3bedf35cec170287 [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
James Kuszmaul61750662021-06-21 21:32:33 -07004#include "frc971/control_loops/control_loop.h"
Alex Perrycb7da4b2019-08-28 19:35:56 -07005#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 Morshed41ed7c22015-11-04 21:03:37 +00009
10namespace y2014_bot3 {
Comran Morshede9b12922015-11-04 19:46:48 +000011namespace control_loops {
Alex Perrycb7da4b2019-08-28 19:35:56 -070012namespace rollers {
Comran Morshede9b12922015-11-04 19:46:48 +000013
Alex Perrycb7da4b2019-08-28 19:35:56 -070014class Rollers
James Kuszmaul61750662021-06-21 21:32:33 -070015 : public frc971::controls::ControlLoop<Goal, Position, Status, Output> {
Comran Morshede9b12922015-11-04 19:46:48 +000016 public:
17 // Constructs a control loops which can take a rollers or defaults to the
Comran Morshed41ed7c22015-11-04 21:03:37 +000018 // rollers at ::2014_bot3::control_loops::rollers.
Alex Perrycb7da4b2019-08-28 19:35:56 -070019 explicit Rollers(::aos::EventLoop *event_loop,
20 const ::std::string &name = "/rollers");
Comran Morshede9b12922015-11-04 19:46:48 +000021
22 protected:
23 // Executes one cycle of the control loop.
Alex Perrycb7da4b2019-08-28 19:35:56 -070024 void RunIteration(const Goal *goal, const Position *position,
25 aos::Sender<Output>::Builder *output,
26 aos::Sender<Status>::Builder *status) override;
Comran Morshede9b12922015-11-04 19:46:48 +000027};
28
Alex Perrycb7da4b2019-08-28 19:35:56 -070029} // namespace rollers
Comran Morshede9b12922015-11-04 19:46:48 +000030} // namespace control_loops
Comran Morshed41ed7c22015-11-04 21:03:37 +000031} // namespace y2014_bot3
Comran Morshede9b12922015-11-04 19:46:48 +000032
Comran Morshed41ed7c22015-11-04 21:03:37 +000033#endif // Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_