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

Commit

Permalink
Merge pull request #115 from rh-robotics/teo-teleop
Browse files Browse the repository at this point in the history
TeleOp Changes
  • Loading branch information
DragonDev07 committed Mar 9, 2024
2 parents 191ca81 + 5358dfe commit 9953e34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public enum Location {
}

// ------ Declare Slide Positions ------ //
public static int[] slidePositions = { 0, -482, -2110, -3460};
public static int[] slidePositions = { 0, -200, -482, -2110, -3460};

// ------ Declare Servo Positions ------ //
public static double passoverDeliveryPos = 0.2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void loop() {
break;
case SLIDES_UP:
// Set Slide Height
slideHeight = 3;
slideHeight = 4;

// Set Next State
endgameState = EndgameState.CLIMB;
Expand All @@ -219,8 +219,8 @@ public void loop() {
slideHeight++;

// If value is above 2, don't increase
if (slideHeight > 3) {
slideHeight = 3;
if (slideHeight > HWC.slidePositions.length - 1) {
slideHeight = HWC.slidePositions.length - 1;
}
}

Expand Down Expand Up @@ -321,6 +321,9 @@ public void loop() {
robot.pulleyLComponent.setTarget(HWC.slidePositions[3]);
robot.pulleyRComponent.setTarget(HWC.slidePositions[3]);
break;
case 4:
robot.pulleyLComponent.setTarget(HWC.slidePositions[4]);
robot.pulleyRComponent.setTarget(HWC.slidePositions[4]);
}

// ------ Telemetry Updates ------ //
Expand Down Expand Up @@ -375,15 +378,16 @@ public void loop() {
private void deliveryPosition() {
wristPosition = HWC.wristDeliveryPos;
passoverPosition = HWC.passoverDeliveryPos;
slideHeight = 1;

if(slideHeight == 0) { slideHeight = 1; }
}

private void intakePosition() {
wristPosition = HWC.wristIntakePos;
passoverPosition = HWC.passoverIntakePos;

robot.toggleClaw('L');
robot.toggleClaw('R');
robot.clawL.setPosition(1);
robot.clawR.setPosition(0);

slideHeight = 0;
}
Expand Down

0 comments on commit 9953e34

Please sign in to comment.