-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathback
41 lines (29 loc) · 1.03 KB
/
back
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
//leftDriveFront.setStopping(brakeType::brake);
//leftDriveBack.setStopping(brakeType::brake);
//rightDriveFront.setStopping(brakeType::brake);
//rightDriveBack.setStopping(brakeType::brake);
task distanceMonitor(printShit);
resetMotors();
int step1 {1250};
moveRight(step1, 50);
moveLeft(step1, 50);
this_thread::sleep_for(200);
resetMotors();
int step2 {-step1 -720};
moveRight(step2, 50);
moveLeft(step2, 50);
while(leftDriveFront.rotation(rotationUnits::deg) > (step2 + 50)){
this_thread::sleep_for(10);
}
this_thread::sleep_for(200);
resetMotors();
moveRight(-205, 50);
moveLeft(205, 50);
while(leftDriveFront.rotation(rotationUnits::deg) < 200){
this_thread::sleep_for(10);
}
this_thread::sleep_for(200);
resetMotors();
int step3 {1725};
moveRight(step3, 80);
moveLeft(step3, 80);