LRT13  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
AutoPyramidAlign.h
1 #ifndef AUTO_PYRAMID_ALIGN_H_
2 #define AUTO_PYRAMID_ALIGN_H_
3 
4 #include <math.h>
5 
6 #include "../Config/Configurable.h"
7 #include "../Config/ConfigManager.h"
8 #include "../Sensors/DriveEncoders.h"
9 #include "../ComponentData/ComponentData.h"
10 #include "../ComponentData/DrivetrainData.h"
11 
12 using namespace data;
13 using namespace data::drivetrain;
14 
15 namespace APA_State
16 {
17  enum Enum
18  {
19  DISABLED,
20  GO_TO_CENTER,
21  WAIT_FOR_SETTLE,
22  TURN
23  };
24 };
25 
26 class AutoPyramidAlign : public Configurable
27 {
28 public:
29  AutoPyramidAlign();
30  ~AutoPyramidAlign();
31 
32  void Tick();
33 
34  void Start();
35  void Reset();
36 
37  void Configure();
38 private:
39  double m_driveToCenterDistance;
40  double m_turnAngle;
41  double m_driveSpeed;
42  double m_turnSpeed;
43 
44  double m_startRobotDist;
45  double m_startRobotAngle;
46 
47  int m_waitForSettleTicks;
48  int m_timer;
49 
50  APA_State::Enum m_currentState;
51 
52  DrivetrainData* m_driveTrain;
53 
54 };
55 
56 #endif