Skip to content

Commit

Permalink
Made all simple autonomous code with the beginning meaning after init…
Browse files Browse the repository at this point in the history
… is pressed the claw locks and goes into stow mode.
  • Loading branch information
Nishk04 committed Nov 12, 2023
1 parent be33df7 commit 23edb95
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public void runOpMode() {
driveMotors.backRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);

claw.rotate.setPosition(Claw.ROTATE_STOW);
claw.grip.setPosition(Claw.GRIP_CLOSED);
waitForStart();
telemetry.addData("Distance Driven Forward:", OdoToInches((driveMotors.backRight.getCurrentPosition() + driveMotors.frontLeft.getCurrentPosition())/2.0));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public void runOpMode() {
intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
double setPoint = 24;
claw.rotate.setPosition(Claw.ROTATE_STOW);
claw.grip.setPosition(Claw.GRIP_CLOSED);
waitForStart();
telemetry.addData("Distance Driven Forward:", OdoToInches((driveMotors.backRight.getCurrentPosition() + driveMotors.frontLeft.getCurrentPosition())/2.0));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public void runOpMode() {
intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
double setPoint = 24;
claw.rotate.setPosition(Claw.ROTATE_STOW);
claw.grip.setPosition(Claw.GRIP_CLOSED);
waitForStart();
telemetry.addData("Distance Driven Forward:", OdoToInches((driveMotors.backRight.getCurrentPosition() + driveMotors.frontLeft.getCurrentPosition())/2.0));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public void runOpMode() {
intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
double setPoint = 30;
claw.rotate.setPosition(Claw.ROTATE_STOW);
claw.grip.setPosition(Claw.GRIP_CLOSED);
waitForStart();
telemetry.addData("Distance Driven Forward:", OdoToInches((driveMotors.backRight.getCurrentPosition() + driveMotors.frontLeft.getCurrentPosition())/2.0));

Expand Down

0 comments on commit 23edb95

Please sign in to comment.