-
Notifications
You must be signed in to change notification settings - Fork 0
/
RedQuarry.java
45 lines (39 loc) · 1.28 KB
/
RedQuarry.java
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
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import org.firstinspires.ftc.teamcode.Autonomous.Auto;
@Autonomous(name = "RedQuarry", group = "Autonomous")
public class RedQuarry extends AutoMasterClass{
private ALLIANCE_COLOR allianceColor = ALLIANCE_COLOR.RED;
public void runOpMode() {
initialize();
initVuforia();
try {
move(0,.3,2);
pause(.1);
SKYSTONE_POSITION position = determineSkystonePlacement(allianceColor);
double inchOff = moveToBlock(allianceColor, position);
strafe(.3,0,"right",40);
pause(.1);
strafe(.3,0,"right",8);
pause(.1);
strafe(.3,0,"left", inchOff);
closeClaw();
move(0, -.3, 2);
pause(.1);
while (currentAngle() > -90) {
heartbeat();
telemetry.addData("Status", currentAngle());
telemetry.update();
turn("left", .3);
}
halt();
pause(.1);
move(0,.3,500.0/17);
openClaw();
}
catch (Exception e){
telemetry.addData("Exception: ", e);
telemetry.update();
}
}
}