Revision 22b85da1 devices/DiWheelDrive/global.hpp
| devices/DiWheelDrive/global.hpp | ||
|---|---|---|
| 169 | 169 |
int rpmHardLeft[2] = {5,20};
|
| 170 | 170 |
int rpmSoftRight[2] = {rpmSoftLeft[1],rpmSoftLeft[0]};
|
| 171 | 171 |
int rpmHardRight[2] = {rpmHardLeft[1],rpmHardLeft[0]};
|
| 172 |
|
|
| 172 | 173 |
|
| 173 | 174 |
// Line Following thresholds set due to calibration |
| 174 | 175 |
// MaxDelta: 18676, FL: 4289, FR: 22965 |
| 175 |
int threshProxyL = 2168; |
|
| 176 |
int threshProxyR = 24406; |
|
| 176 |
// Thresh FL: 5241, FR: 25528 |
|
| 177 |
int threshProxyL = 5241; |
|
| 178 |
int threshProxyR = 25528; |
|
| 179 |
int threshWhite = 78000; |
|
| 180 |
|
|
| 181 |
// PID for line following: |
|
| 182 |
float K_p = 0.0f; |
|
| 183 |
float K_i = 0.0f; |
|
| 184 |
float K_d = 0.0f; |
|
| 185 |
|
|
| 186 |
// Integral part |
|
| 187 |
int accumHist = 0; |
|
| 188 |
int oldError = 0; |
|
| 189 |
|
|
| 190 |
// Debugging stuff -------------- |
|
| 191 |
int forwardSpeed = 10; |
|
| 192 |
int enableRecord = 0; |
|
| 177 | 193 |
|
| 178 | 194 |
// Buffer for sensor values |
| 179 | 195 |
struct sensorRecord |
| ... | ... | |
| 186 | 202 |
|
| 187 | 203 |
int sensSamples = 0; |
| 188 | 204 |
sensorRecord senseRec[1000]; |
| 205 |
sensorRecord maxDist; |
|
| 189 | 206 |
|
| 190 |
|
|
| 207 |
// ----------------------------- |
|
| 191 | 208 |
public: |
| 192 | 209 |
Global() : |
| 193 | 210 |
HW_I2C1(&I2CD1), HW_I2C2(&I2CD2), |
Also available in: Unified diff