-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntropyDrive.h
More file actions
65 lines (41 loc) · 1.31 KB
/
EntropyDrive.h
File metadata and controls
65 lines (41 loc) · 1.31 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef ENTROPYDRIVE_H_
#define ENTROPYDRIVE_H_
#include "EntropySubsystemTemplate.h"
#include "WPILib.h"
class EntropyDrive : public EntropySubsystemTemplate {
private:
enum DriveMode
{
Rotate = 0,
Radius
};
double previousValue;
Encoder * m_leftEncoderTest;
Encoder * m_rightEncoderTest;
RobotDrive * wpiDrive;
//The robot drive system motors
CANJaguar *MotorDriveLeft1;
CANJaguar *MotorDriveLeft2;
CANJaguar *MotorDriveRight1;
CANJaguar *MotorDriveRight2;
float absolutevalue(float x);
bool range(float x, float y, float maxthreshold);
float drive_table_limit(float x, float max, float min);
void get_index(int &x_index, int &y_index, float moveValue, float rotateValue, DriveMode mode);
float EntropyDrive::Limit(float num);
float right_scale(float rotateValue, float moveValue, DriveMode mode);
float left_scale(float rotateValue, float moveValue, DriveMode mode);
double addDeadZone(double value);
float moveValueDampen (float moveValue);
public:
EntropyDrive () { };
bool Initialize ();
void Cleanup ();
char * GetFeedback() { return NULL; }
bool DriveRobot(float MoveValue, float RotateValue);
bool DriveRobotTrig(float MoveValue, float RotateValue);
void DriveTrainTest( );
void InitEncoderTest();
void DisplayEncodersTestDSLine5Line6();
};
#endif