-
Notifications
You must be signed in to change notification settings - Fork 0
/
Values.h
153 lines (128 loc) · 6.4 KB
/
Values.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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
//Values.h
#ifndef VALUES_H
#define VALUES_H
const int SIDECAR_2 = 1;
const int SIDECAR_4 = 2;
const int DRIVE_JOYSTICK = 1;
const int SHOOTER_JOYSTICK = 2;
const int FR_DRIVE_VICTOR = 9;
const int FL_DRIVE_VICTOR = 10;
const int BR_DRIVE_VICTOR = 10;
const int BL_DRIVE_VICTOR = 2;
const int DRIVE_VICTOR_SIDECARS[4] = {SIDECAR_2, SIDECAR_4, SIDECAR_2, SIDECAR_4};
//FR FL BR BL
const int DRIVE_VICTORS[4] = {FR_DRIVE_VICTOR, FL_DRIVE_VICTOR, BR_DRIVE_VICTOR, BL_DRIVE_VICTOR};
const int FR_DRIVE_ENCODER_A = 3;
const int FR_DRIVE_ENCODER_B = 4;
const int FR_DRIVE_ENCODER_SIDECAR = SIDECAR_2;
const int FR_DRIVE_ENCODER_DISTANCE_PER_PULSE = 1;
const bool FR_DRIVE_ENCODER_REVERSE = false;
const int FL_DRIVE_ENCODER_A = 3;
const int FL_DRIVE_ENCODER_B = 4;
const int FL_DRIVE_ENCODER_SIDECAR = SIDECAR_4;
const int FL_DRIVE_ENCODER_DISTANCE_PER_PULSE = 1;
const bool FL_DRIVE_ENCODER_REVERSE = false;
const int BR_DRIVE_ENCODER_A = 1;
const int BR_DRIVE_ENCODER_B = 2;
const int BR_DRIVE_ENCODER_SIDECAR = SIDECAR_2;
const int BR_DRIVE_ENCODER_DISTANCE_PER_PULSE = 1;
const bool BR_DRIVE_ENCODER_REVERSE = false;
const int BL_DRIVE_ENCODER_A = 1;
const int BL_DRIVE_ENCODER_B = 2;
const int BL_DRIVE_ENCODER_SIDECAR = SIDECAR_4;
const int BL_DRIVE_ENCODER_DISTANCE_PER_PULSE = 1;
const bool BL_DRIVE_ENCODER_REVERSE = false;
const int DRIVE_ENCODERS[4][2] = {
{FR_DRIVE_ENCODER_A, FR_DRIVE_ENCODER_B},
{FL_DRIVE_ENCODER_A, FL_DRIVE_ENCODER_B},
{BR_DRIVE_ENCODER_A, BR_DRIVE_ENCODER_B},
{BL_DRIVE_ENCODER_A, BL_DRIVE_ENCODER_B}
};
const int DRIVE_ENCODER_SIDECARS[4] = {FR_DRIVE_ENCODER_SIDECAR, FL_DRIVE_ENCODER_SIDECAR, BR_DRIVE_ENCODER_SIDECAR, BL_DRIVE_ENCODER_SIDECAR};
const int DRIVE_ENCODER_DISTANCES_PER_PULSE[4] = {FR_DRIVE_ENCODER_DISTANCE_PER_PULSE, FL_DRIVE_ENCODER_DISTANCE_PER_PULSE, BR_DRIVE_ENCODER_DISTANCE_PER_PULSE, BL_DRIVE_ENCODER_DISTANCE_PER_PULSE};
const bool DRIVE_ENCODER_REVERSES[4] = {FR_DRIVE_ENCODER_REVERSE, FL_DRIVE_ENCODER_REVERSE, BR_DRIVE_ENCODER_REVERSE, BL_DRIVE_ENCODER_REVERSE};
const double FR_DRIVE_PID_KP = 0.5;
const double FL_DRIVE_PID_KP = 0.5;
const double BR_DRIVE_PID_KP = 0.5;
const double BL_DRIVE_PID_KP = 0.5;
const double FR_DRIVE_PID_KI = 0.005;
const double FL_DRIVE_PID_KI = 0.005;
const double BR_DRIVE_PID_KI = 0.005;
const double BL_DRIVE_PID_KI = 0.005;
const double FR_DRIVE_PID_KD = 0.5;
const double FL_DRIVE_PID_KD = 0.5;
const double BR_DRIVE_PID_KD = 0.5;
const double BL_DRIVE_PID_KD = 0.5;
const double FR_DRIVE_PID_SCALAR = 500.0;
const double FL_DRIVE_PID_SCALAR = 500.0;
const double BR_DRIVE_PID_SCALAR = 500.0;
const double BL_DRIVE_PID_SCALAR = 500.0;
const double FR_DRIVE_PID[4] = {FR_DRIVE_PID_KP, FR_DRIVE_PID_KI, FR_DRIVE_PID_KD, FR_DRIVE_PID_SCALAR};
const double FL_DRIVE_PID[4] = {FL_DRIVE_PID_KP, FL_DRIVE_PID_KI, FL_DRIVE_PID_KD, FL_DRIVE_PID_SCALAR};
const double BR_DRIVE_PID[4] = {BR_DRIVE_PID_KP, BR_DRIVE_PID_KI, BR_DRIVE_PID_KD, BR_DRIVE_PID_SCALAR};
const double BL_DRIVE_PID[4] = {BL_DRIVE_PID_KP, BL_DRIVE_PID_KI, BL_DRIVE_PID_KD, BL_DRIVE_PID_SCALAR};
//TODO: Check!
const double * DRIVE_PID[4] = {FR_DRIVE_PID, FL_DRIVE_PID, BR_DRIVE_PID, BL_DRIVE_PID};
const double SHOOTER_RPM = 0.6;
const double SHOOTER_ACCEL_RPM = 0.9;
const double SHOOTER_RPM_IDLE = SHOOTER_RPM / 2.0;
const double SHOOTER_ACCEL_RPM_IDLE = SHOOTER_ACCEL_RPM / 2.0;
const double SHOOTER_TACHOMETER_RPM = 2000.0;
const double FLIP_SPEED = 0.5;
const int SHOOTER_VICTOR = 8;
const int SHOOTER_ACCEL_VICTOR = 6;
const int SHOOTER_VICTORS[2] = {SHOOTER_VICTOR, SHOOTER_ACCEL_VICTOR};
const int SHOOTER_VICTOR_SIDECARS[2] = {SIDECAR_4, SIDECAR_2};
const int SHOOTER_TACHOMETER = 14;
const int SHOOTER_TACHOMETER_SIDECAR = SIDECAR_4;
const int SHOOTER_TILT_VICTOR = 5;
const int SHOOTER_TILT_VICTOR_SIDECAR = SIDECAR_2;
const int SHOOTER_TILT_LIMIT_TOP = 0;
const int SHOOTER_TILT_LIMIT_BOTTOM = 0;
const int SHOOTER_TILT_LIMIT_SIDECAR = 0;
const int SHOOTER_TILT_LIMITS[3] = {SHOOTER_TILT_LIMIT_SIDECAR, SHOOTER_TILT_LIMIT_TOP, SHOOTER_TILT_LIMIT_BOTTOM};
const int SHOOTER_TILT_ENCODER_A = 0;
const int SHOOTER_TILT_ENCODER_B = 0;
const int SHOOTER_TILT_ENCODER_SIDECAR = 0;
const int SHOOTER_TILT_ENCODER_DISTANCE_PER_PULSE = 1;
const bool SHOOTER_TILT_ENCODER_REVERSE = false;
const int SHOOTER_TILT_ENCODER[4] = {SHOOTER_TILT_ENCODER_SIDECAR, SHOOTER_TILT_ENCODER_A, SHOOTER_TILT_ENCODER_B, SHOOTER_TILT_ENCODER_DISTANCE_PER_PULSE};
const double SHOOTER_TILT_POSITION_KP = 0.005;
const double SHOOTER_TILT_POSITION_KI = 0.0;
const double SHOOTER_TILT_POSITION_KD = 0.0;
const double SHOOTER_TILT_POSITION_SCALAR = 180.0;
const double SHOOTER_TILT_POSITION_PID[3] = {SHOOTER_TILT_POSITION_KP, SHOOTER_TILT_POSITION_KI, SHOOTER_TILT_POSITION_KD};
const double SHOOTER_TILT_KP = 0.05;
const double SHOOTER_TILT_KI = 0.005;
const double SHOOTER_TILT_KD = 0.05;
const double SHOOTER_TILT_SCALAR = 20.0;
const double SHOOTER_TILT_PID[4] = {SHOOTER_TILT_KP, SHOOTER_TILT_KI, SHOOTER_TILT_KD, SHOOTER_TILT_SCALAR};
const int UPTAKE_RELAY = 8;
const int UPTAKE_RELAY_SIDECAR = SIDECAR_4;
const int UPTAKE_GATEKEEPER = 7;
const int UPTAKE_GATEKEEPER_SIDECAR = SIDECAR_4;
const int INTAKE_ARM_VICTOR = 6;
const int INTAKE_ARM_VICTOR_SIDECAR = SIDECAR_4;
const int INTAKE_ARM_ENCODER_A = 0;
const int INTAKE_ARM_ENCODER_B = 0;
const int INTAKE_ARM_ENCODER_SIDECAR = 0;
const int INTAKE_ARM_ENCODER_DISTANCE_PER_PULSE = 0;
const int INTAKE_ARM_ENCODER[4] = {INTAKE_ARM_ENCODER_SIDECAR, INTAKE_ARM_ENCODER_A, INTAKE_ARM_ENCODER_B, INTAKE_ARM_ENCODER_DISTANCE_PER_PULSE};
const double INTAKE_ARM_POSITION_KP = 0.0;
const double INTAKE_ARM_POSITION_KI = 0.0;
const double INTAKE_ARM_POSITION_KD = 0.0;
const double INTAKE_ARM_POSITION_SCALAR = 0.0;
const double INTAKE_ARM_POSITION_PID[3] = {SHOOTER_TILT_POSITION_KP, SHOOTER_TILT_POSITION_KI, SHOOTER_TILT_POSITION_KD};
const double INTAKE_ARM_KP = 0.0;
const double INTAKE_ARM_KI = 0.0;
const double INTAKE_ARM_KD = 0.0;
const double INTAKE_ARM_SCALAR = 0.0;
const double INTAKE_ARM_PID[4] = {INTAKE_ARM_KP, INTAKE_ARM_KI, INTAKE_ARM_KD, INTAKE_ARM_SCALAR};
const int INTAKE_WRIST_VICTOR = 3;
const int INTAKE_WRIST_VICTOR_SIDECAR = SIDECAR_4;
/*
//TODO: Check!
const Victor nullMotor(0, 0);
const PIDVelocityMotor nullPIDMotor();
*/
#endif //VALUES_H