Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #64 from rh-robotics/George-Jensen-Controls-Fix
Browse files Browse the repository at this point in the history
Controls Changes
  • Loading branch information
Picklze1 authored Dec 11, 2023
2 parents d353769 + 09727a2 commit 5fce7be
Showing 1 changed file with 10 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,34 +70,17 @@ public void init() {
" * Gamepad 2\n" +
" * Right Bumper = Claw Joint +\n" +
" * Right Trigger = Claw Joint -\n" +
" * Left Bumper = Automatic Scoring\n" +
" * Left Trigger = VS, Arm and Claw reset (Automatic Scoring Reset)\n" +
" * X = Automatic Scoring\n" +
" * Y = VS, Arm and Claw reset (Automatic Scoring Reset)\n" +
" * A = Activate Intake (Hold)\n" +
" * X = Claw Lock + (Manual)\n" +
" * Y = Claw Lock - (Manual)\n" +
" * Left Bumper = Claw Lock + (Manual)\n" +
" * Left Trigger = Claw Lock - (Manual)\n" +
" * D Pad Up = VS Up (Manual)\n" +
" * D Pad Down = VS Down (Manual)\n");
" * D Pad Down = VS Down (Manual)");
}

@Override
public void loop() {
/** Controls:
* Gamepad 1
* Left Stick y = Drive
* Left Stick x = Strafe
* Right Stick x = Turn
*
* Gamepad 2
* Right Bumper = Claw Joint +
* Right Trigger = Claw Joint -
* Left Bumper = Automatic Scoring
* Left Trigger = VS, Arm and Claw reset (Automatic Scoring Reset)
* A = Activate Intake (Hold)
* X = Claw Lock + (Manual)
* Y = Claw Lock - (Manual)
* D Pad Up = VS Up (Manual)
* D Pad Down = VS Down (Manual)
*/

// Values for drive.
drive = gamepad1.left_stick_y * 0.8;
Expand All @@ -116,21 +99,21 @@ public void loop() {
telemetry.addData("rightBPower: ", rightBPower);

// Calling scoring() via left bumper and resetting via left trigger
if (gamepad2.left_bumper) {
if (gamepad2.x) {
scoring();
} else if (gamepad2.left_trigger > 0.5 && !scoringATM) {
} else if (gamepad2.y && !scoringATM) {
resetPos();
telemetry.addData("Scoring Pos", "Reset");
}

// Move claw via x and y.
if (gamepad2.x) {
if (gamepad2.left_bumper) {
robot.<Servo>get("clawLock").setPosition(robot.<Servo>get("clawLock").getPosition() + -0.125);
} else if (gamepad2.y) {
} else if (gamepad2.left_trigger > 0.5) {
robot.<Servo>get("clawLock").setPosition(robot.<Servo>get("clawLock").getPosition() + 0.125);
}

// Moving VS maually via dpad up and down.
// Moving VS manually via dpad up and down.
if (gamepad2.dpad_up) {
robot.<DcMotor>get("leftViperSlide").setPower(0.5);
robot.<DcMotor>get("rightViperSlide").setPower(0.5);
Expand Down

0 comments on commit 5fce7be

Please sign in to comment.