This commit is contained in:
ImposterVarunoverlord 2024-03-21 17:12:54 -05:00
parent 37fd9eadf1
commit aba3c58fd4
2 changed files with 13 additions and 12 deletions

View File

@ -166,5 +166,6 @@ public class Arm {
doorServo.setPosition(doorPos); doorServo.setPosition(doorPos);
wristServo.setPosition(wristPos); wristServo.setPosition(wristPos);
elbow.setPosition(elbowPos);
} }
} }

View File

@ -189,21 +189,21 @@ public class RedTeleop extends OpMode {
robot.slides.increaseTarget(controller2.getLeftStick().getY()); robot.slides.increaseTarget(controller2.getLeftStick().getY());
if (robot.intake.getPower() >= 0.01) { // if (robot.intake.getPower() >= 0.01) {
robot.arm.setDoor(OPEN); // robot.arm.setDoor(OPEN);
} else if (robot.intake.getPower() <= -0.01) { // } else if (robot.intake.getPower() <= -0.01) {
robot.arm.setDoor(OPEN); // robot.arm.setDoor(OPEN);
} else if (controller2.getLeftBumper().isPressed()) { // } else if (controller2.getLeftBumper().isPressed()) {
robot.arm.setDoor(Arm.DoorPosition.OPEN); // robot.arm.setDoor(Arm.DoorPosition.OPEN);
} else { // } else {
robot.arm.setDoor(CLOSE); // robot.arm.setDoor(CLOSE);
} // }
//Elbowpos //Elbowpos
if (controller2.getDRight().isPressed()){ if (controller2.getDRight().isJustPressed()){
robot.arm.setElbowPos(4); robot.arm.setElbowPos(4);
} else if (controller2.getDLeft().isPressed()) { } else if (controller2.getDLeft().isJustPressed()) {
robot.arm.setElbowPos(3); robot.arm.setElbowPos(3);
}else { }else if(controller2.getDUp().isJustPressed()) {
robot.arm.setElbowPos(1); robot.arm.setElbowPos(1);
} }