Skip to content

Commit

Permalink
Merge pull request ftctechnh#68 from 6150FTC/master
Browse files Browse the repository at this point in the history
get main changes
  • Loading branch information
JeremyYao committed Dec 28, 2018
2 parents bd6d26f + b3596e8 commit 3a6c35f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public void runOpMode()
compRobot = new CompRobot(hardwareMap,this);
vuforiaFunctions = new VuforiaFunctions(this, hardwareMap);
float yawAngle = 90;
float frontSensorDepth = 2;
float frontSensorDepth = 4.5f;
float rightSensorDepth = 2;
float leftSensorDepth = 2;
float backSensorDepth = 2;
float yawAngleTurn;
float distanceTraveled = 0;
waitForStart();
compRobot.climbDown();
sleep(200);
//compRobot.climbDown();
//sleep(200);
compRobot.driveStraight(8,.8f);
compRobot.pivotenc(95, .8f); //100 worked about 2/3 of the time

Expand Down Expand Up @@ -72,10 +72,10 @@ public void runOpMode()
sleep(200);
compRobot.deployMarker();
telemetry.update();
compRobot.driveStraight(-20, .5f);
/*compRobot.driveStraight(-20, .5f);
compRobot.pivotenc(-230, .8f);
compRobot.hugWallToLeft(6 + rightSensorDepth, 9 + rightSensorDepth, 38, 75);
compRobot.driveStraight(15, .8f); //since the hugwall stops at the crater, this takes robot into crater
compRobot.stopDriveMotors();
compRobot.stopDriveMotors();*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void driveStraight(float dist_In, float pow)
super.goBackwards(pow, pow);

dist_In = Math.abs(dist_In);
float encTarget = 19.4366f * dist_In - 44.004f;
float encTarget = Math.abs(dist_In * 20.167f - 46.111f);

while ((Math.abs(super.getDriveLeftOne().getCurrentPosition()) < encTarget)
&& (Math.abs(super.getDriveRightOne().getCurrentPosition()) < encTarget)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,46 @@ public void runOpMode() throws InterruptedException
{
compRobot = new CompRobot(hardwareMap, this);
waitForStart();
compRobot.deployMarker();
while (opModeIsActive())

/*compRobot.driveStraight(50,.8f);
while (!gamepad1.a && !isStopRequested())
{
}
compRobot.driveStraight(100,.8f);
while (!gamepad1.b && !isStopRequested())
{
}
compRobot.driveStraight(250,.8f);
while (!gamepad1.x && !isStopRequested())
{
}
compRobot.driveStraight(400,.8f);
while (!gamepad1.y && !isStopRequested())
{
}
compRobot.driveStraight(500,.8f);
while (!gamepad1.a && !isStopRequested())
{
}
compRobot.driveStraight(750,.8f);
while (!gamepad1.b && !isStopRequested())
{
}
compRobot.driveStraight(850,.8f);
while (!gamepad1.x && !isStopRequested())
{
}
compRobot.driveStraight(1000,.8f);
while (!gamepad1.y && !isStopRequested())
{
}*/
}
}

0 comments on commit 3a6c35f

Please sign in to comment.