forked from Team612/612-2014
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDriveTrain.h
executable file
·33 lines (30 loc) · 891 Bytes
/
DriveTrain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef DRIVETRAIN_H
#define DRIVETRAIN_H
#include <RobotDrive.h>
#include "EncodeDistance.h"
#include "ports.h"
class DriveTrain : public RobotDrive
{
public:
DriveTrain(uint8_t modFL,uint32_t chanFL,uint8_t modRL,uint32_t chanRL,uint8_t modFR,uint32_t chanFR,uint8_t modRR,uint32_t chanRR);
~DriveTrain();
enum Dir{RIGHT, LEFT};
void autoDrive(double distance);
void autoTurn(double degrees);
void teleTurn(Dir direction, double power);
void update();
static void updateHelper(void* instName);
bool isAuto();
void stopAuto();
EncodeDistance* encode;
static bool isMovingL;
static bool isMovingR;
static bool isTurningL;
static bool isTurningR;
double NeededDist;
static const float SPEED;
static const double PI;
static const double ROBOTRAD = 1;
static const double CIRCUMROBOT;
};
#endif // DRIVETRAIN_H