Updated untested arm code includes: high bucket score and moved low bucket score and high bucket score to gamepad 2

This commit is contained in:
robotics1
2024-11-04 20:11:28 -08:00
parent 0f42160c4f
commit 9b2a04013f

View File

@ -15,6 +15,8 @@ import static org.firstinspires.ftc.teamcode.PedroConstants.LEFT_ENCODER_DIRECTI
import static org.firstinspires.ftc.teamcode.PedroConstants.RIGHT_ENCODER;
import static org.firstinspires.ftc.teamcode.PedroConstants.RIGHT_ENCODER_DIRECTION;
import android.graphics.Point;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.DcMotor;
@ -36,6 +38,8 @@ public class DevTeleop extends OpMode {
public LiftSubsystem lift;
public Gamepad currentGamepad1;
public Gamepad previousGamepad1;
public Gamepad currentGamepad2;
public Gamepad previousGamepad2;
public DcMotor frontLeftMotor;
public DcMotor backLeftMotor;
public DcMotor frontRightMotor;
@ -63,6 +67,7 @@ public class DevTeleop extends OpMode {
currentGamepad1 = new Gamepad();
previousGamepad1 = new Gamepad();
}
public void theDrop(ArmSubsystem arm, WristSubsystem wrist) {
@ -91,12 +96,18 @@ public class DevTeleop extends OpMode {
}
public void theLowBucketScore(LiftSubsystem lift, WristSubsystem wrist, ArmSubsystem arm) {
if (currentGamepad1.y && !previousGamepad1.y) {
if (currentGamepad2.y && !previousGamepad2.y) {
lift.toLowBucket();
wrist.bucketWrist();
}
}
public void theHighBucketScore(LiftSubsystem lift, WristSubsystem wrist, ArmSubsystem arm) {
if (currentGamepad2.a && !previousGamepad2.a) {
lift.toHighBucket();
wrist.bucketWrist();
}
}
@Override
public void loop() {
previousGamepad1.copy(currentGamepad1);
@ -106,6 +117,7 @@ public class DevTeleop extends OpMode {
thePickup(claw);
theLift(arm, wrist);
theLowBucketScore(lift, wrist, arm);
theHighBucketScore(lift, wrist, arm);
double max;