Changing arm controls to be more intuitive
This commit is contained in:
@ -45,7 +45,7 @@ public class DevTeleop extends OpMode {
|
||||
public DcMotor frontRightMotor;
|
||||
public DcMotor backRightMotor;
|
||||
|
||||
private double MAX_POWER = .6;
|
||||
private double MAX_POWER = .45;
|
||||
@Override
|
||||
public void init() {
|
||||
claw = new ClawSubsystem(hardwareMap, ClawSubsystem.ClawState.CLOSED);
|
||||
@ -74,22 +74,22 @@ public class DevTeleop extends OpMode {
|
||||
}
|
||||
|
||||
public void theDrop(ArmSubsystem arm, WristSubsystem wrist) {
|
||||
|
||||
if (currentGamepad1.a && !previousGamepad1.a) {
|
||||
//pick up
|
||||
if (currentGamepad2.dpad_down && !previousGamepad2.dpad_down) {
|
||||
wrist.floorWrist();
|
||||
arm.engageArm();
|
||||
}
|
||||
|
||||
}
|
||||
public void thePickup(ClawSubsystem claw) {
|
||||
|
||||
if (currentGamepad1.right_bumper && !previousGamepad1.right_bumper) {
|
||||
//claw open close
|
||||
if (currentGamepad2.right_bumper && !previousGamepad2.right_bumper) {
|
||||
claw.switchState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void theLift(ArmSubsystem arm, WristSubsystem wrist) {
|
||||
/* public void theLift(ArmSubsystem arm, WristSubsystem wrist) {
|
||||
|
||||
if (currentGamepad1.b && !previousGamepad1.b) {
|
||||
arm.parkArm();
|
||||
@ -97,17 +97,19 @@ public class DevTeleop extends OpMode {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
public void theLowBucketScore(LiftSubsystem lift, WristSubsystem wrist, ArmSubsystem arm) {
|
||||
if (currentGamepad2.y && !previousGamepad2.y) {
|
||||
//low bucket
|
||||
if (currentGamepad2.a && !previousGamepad2.a) {
|
||||
lift.toLowBucket();
|
||||
arm.bucketArm();
|
||||
wrist.bucketWrist();
|
||||
}
|
||||
}
|
||||
public void theHighBucketScore(LiftSubsystem lift, WristSubsystem wrist, ArmSubsystem arm) {
|
||||
|
||||
if (currentGamepad2.a && !previousGamepad2.a) {
|
||||
public void theHighBucketScore(LiftSubsystem lift, WristSubsystem wrist, ArmSubsystem arm) {
|
||||
//high basket
|
||||
if (currentGamepad2.b && !previousGamepad2.b) {
|
||||
lift.toHighBucket();
|
||||
arm.bucketArm();
|
||||
wrist.bucketWrist();
|
||||
@ -115,7 +117,8 @@ public class DevTeleop extends OpMode {
|
||||
}
|
||||
|
||||
public void theTravel(LiftSubsystem lift, ArmSubsystem arm, WristSubsystem wrist){
|
||||
if (currentGamepad2.dpad_down && !previousGamepad2.dpad_down){
|
||||
//
|
||||
if (currentGamepad2.dpad_right && !previousGamepad2.dpad_right){
|
||||
lift.toFloor();
|
||||
arm.bucketArm();
|
||||
wrist.floorWrist();
|
||||
@ -131,7 +134,7 @@ public class DevTeleop extends OpMode {
|
||||
|
||||
theDrop(arm, wrist);
|
||||
thePickup(claw);
|
||||
theLift(arm, wrist);
|
||||
// theLift(arm, wrist);
|
||||
theLowBucketScore(lift, wrist, arm);
|
||||
theHighBucketScore(lift, wrist, arm);
|
||||
theTravel(lift, arm, wrist);
|
||||
|
Reference in New Issue
Block a user