Skip to content

Commit

Permalink
made a test for whether isSkystone works
Browse files Browse the repository at this point in the history
  • Loading branch information
MayaExists committed Dec 20, 2019
1 parent fb50078 commit b2f5781
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Dobby.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,30 @@ public void teleop(Gamepad gamepad1, Gamepad gamepad2){
}
}
public void autonomous() {
this.telemetry.addData(DOBBY_CAPTION, "Dobby is doing the autonomous");
driveTrain.goForward(24.00); // assuming robot is 18" long & camera is on front of robot
int blockNum = 1;
if(blockNum<=2 && !vuforia.isSkystone() && this.opMode.opModeIsActive()){
this.telemetry.addData("Block Number is", blockNum);
this.telemetry.addData("Is Skystone", "" + vuforia.isSkystone());
driveTrain.goRight(8.0);
this.telemetry.update();
blockNum++;
}
//pickup.rapOut(100);
//pickup.handClose();
//lift.moveUp(3);
//driveTrain.turn(90);
driveTrain.goLeft(blockNum*8 + 60.0); // should end up in "building zone"
// pickup.handOpen();
driveTrain.goForward(4);
driveTrain.goBackward(26);
driveTrain.goRight(48);
this.telemetry.update();
this.telemetry.addData(DOBBY_CAPTION, "Dobby is doing the autonomous");
// driveTrain.goForward(24.00); // assuming robot is 18" long & camera is on front of robot
// int blockNum = 1;
// if(blockNum<=2 && !vuforia.isSkystone() && this.opMode.opModeIsActive()){
// this.telemetry.addData("Block Number is", blockNum);
// this.telemetry.addData("Is Skystone", "" + vuforia.isSkystone());
// driveTrain.goRight(8.0);
// this.telemetry.update();
// blockNum++;
// }
// //pickup.rapOut(100);
// //pickup.handClose();
// //lift.moveUp(3);
// //driveTrain.turn(90);
// driveTrain.goLeft(blockNum*8 + 60.0); // should end up in "building zone"
// // pickup.handOpen();
// driveTrain.goForward(4);
// driveTrain.goBackward(26);
// driveTrain.goRight(48);
// this.telemetry.update();

while(!vuforia.isSkystone() && this.opMode.opModeIsActive()){
driveTrain.goForward(2);
}
}
public void useVuforia(){
while(this.opMode.opModeIsActive()) {
Expand Down

0 comments on commit b2f5781

Please sign in to comment.