blob: 7b0724715378606e418276fb1fa537e21b40215f [file] [log] [blame]
brians343bc112013-02-10 01:53:46 +00001#ifndef FRC971_CONTROL_LOOPS_DRIVETRAIN_H_
2#define FRC971_CONTROL_LOOPS_DRIVETRAIN_H_
3
4#include "aos/common/control_loop/ControlLoop.h"
James Kuszmaulf254c1a2013-03-10 16:31:26 -07005#include "frc971/control_loops/drivetrain/drivetrain.q.h"
brians343bc112013-02-10 01:53:46 +00006
7namespace frc971 {
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 frc971
31
32#endif // FRC971_CONTROL_LOOPS_DRIVETRAIN_H_