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

TeleOp Changes #115

Merged
merged 2 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading