blob: 03b3bd0b8efe714926b0237ad4674e44a4bde359 [file] [log] [blame]
Daniel Petti1f448512013-10-19 19:35:55 +00001#ifndef BOT3_CONTROL_LOOPS_DRIVETRAIN_H_
2#define BOT3_CONTROL_LOOPS_DRIVETRAIN_H_
3
4#include "aos/common/control_loop/ControlLoop.h"
5#include "bot3/control_loops/drivetrain/drivetrain.q.h"
6
7namespace bot3 {
8namespace control_loops {
9
10class DrivetrainLoop
11 : public aos::control_loops::ControlLoop<control_loops::Drivetrain> {
12 public:
13 // Constructs a control loop which can take a Drivetrain or defaults to the
14 // drivetrain at frc971::control_loops::drivetrain
15 explicit DrivetrainLoop(
16 control_loops::Drivetrain *my_drivetrain = &control_loops::drivetrain)
17 : aos::control_loops::ControlLoop<control_loops::Drivetrain>(
18 my_drivetrain) {}
19
20 protected:
21 // Executes one cycle of the control loop.
22 virtual void RunIteration(
23 const control_loops::Drivetrain::Goal *goal,
24 const control_loops::Drivetrain::Position *position,
25 control_loops::Drivetrain::Output *output,
26 control_loops::Drivetrain::Status *status);
27};
28
29} // namespace control_loops
30} // namespace bot3
31
32#endif // BOT3_CONTROL_LOOPS_DRIVETRAIN_H_