LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Drive.h
1 #ifndef DRIVE_H_
2 #define DRIVE_H_
3 
4 #include "Automation.h"
5 #include "../../ComponentData/DrivetrainData.h"
6 #include "../../Control/TrapezoidProfile.h"
7 #include "../../Config/Configurable.h"
8 
12 class Drive : public Automation, public Configurable
13 {
14 public:
15  Drive(double distance, double maxSpeed = 1.0, double errorThreshold = 0.5, bool continuous = false);
16 
17  bool Start();
18  bool Run();
19  bool Abort();
20  void AllocateResources();
21 
22  void Configure();
23 
24 private:
25  DrivetrainData* m_drivetrain;
26 
27  double m_distance;
28  double m_maxSpeed;
29  double m_errorThreshold;
30  bool m_continuous;
31 
32  double m_start;
33  TrapezoidProfile* m_profile;
34  double m_maxVelocity;
35  double m_timeToMax;
36 };
37 
38 #endif