Compare commits
8 Commits
3bcde94416
...
9618bb7b29
Author | SHA1 | Date | |
---|---|---|---|
9618bb7b29 | |||
15c561cd69 | |||
b0db84a61c | |||
b5c7379e00 | |||
440a57dbf4 | |||
7900c95e82 | |||
7dda91af9c | |||
78195ed0f6 |
@ -62,17 +62,16 @@ public class SpecimenAuto extends OpMode {
|
||||
state = 2;
|
||||
break;
|
||||
case 2:
|
||||
lift.toSpecimanHangHeight();
|
||||
new SleepAction(5);
|
||||
state = 3;
|
||||
break;
|
||||
case 3:
|
||||
wrist.toSpecimenHang();
|
||||
|
||||
new SleepAction(5);
|
||||
state = 4;
|
||||
break;
|
||||
case 4:
|
||||
lift.toSpecimanReleaseHeight();
|
||||
|
||||
new SleepAction(5);
|
||||
state = 5;
|
||||
break;
|
||||
|
@ -122,7 +122,7 @@ public class CometBotTeleOpDevelopment {
|
||||
|
||||
private void armToBucketPosition() {
|
||||
if (currentGamepad2.dpad_up && !previousGamepad2.dpad_up) {
|
||||
armParked = true;
|
||||
armParked = false;
|
||||
arm.toBucketPosition();
|
||||
wrist.toBucketPosition();
|
||||
wristPickup = false;
|
||||
@ -175,15 +175,15 @@ public class CometBotTeleOpDevelopment {
|
||||
|
||||
if (gamepad1.x && claw.getState() == ClawSubsystem.ClawState.CLOSED) {
|
||||
//now slap on bar, first wrist, then arm, then claw then driver must drive away
|
||||
dualSlides.toFixedPosition(500);
|
||||
dualSlides.toFixedPosition(200);
|
||||
dualSlides.update();
|
||||
}
|
||||
|
||||
if (gamepad1.y) {
|
||||
arm.hangBlueberrySkyhook();
|
||||
wrist.hangBlueberrySkyhook();
|
||||
arm.hangBlueberrySkyhook();
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
Thread.sleep(1500);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public class DualMotorSliderTest extends LinearOpMode {
|
||||
|
||||
private DcMotorEx liftSlideLeft;
|
||||
private DcMotorEx liftSlideRight;
|
||||
public static double kp = 0.0015, ki = 0, kd = 0;
|
||||
public static double kp = 0.002, ki = 0, kd = 0;
|
||||
private double lastError = 0;
|
||||
private double integralSum = 0;
|
||||
public static int targetPosition = 0;
|
||||
|
@ -14,7 +14,7 @@ public class RobotConstants {
|
||||
public final static double armReverseBucket = 0.08;
|
||||
public final static double armPark = 0.33;
|
||||
//value for grabbing the hook Specimen
|
||||
public final static double grabBlueberry = 0.69;
|
||||
public final static double grabBlueberry = 0.56;
|
||||
public final static double armGrabBlueberrySkyhook = 0.045;
|
||||
public final static double wristGrabBlueberrySkyhook = 0.08;
|
||||
public final static double armHangBlueberrySkyhook = 0.18;
|
||||
|
@ -59,7 +59,7 @@ public class DualMotorSliderSubsystem {
|
||||
It's the only value we set because the variable ki and kd deal with how to handle when we're off the path.
|
||||
Since we're going straight, we don't need to worry about.
|
||||
*/
|
||||
public final static double kp = 0.0015, ki = 0, kd = 0;
|
||||
public final static double kp = 0.002, ki = 0, kd = 0;
|
||||
|
||||
/*
|
||||
lastError/integralSum/timer - These 3 variables are placeholders in determining how much
|
||||
|
@ -59,5 +59,12 @@ public class HangMotorSubsystem {
|
||||
//write in limits for protection
|
||||
hang.setPower(Position);
|
||||
}
|
||||
public void setPower(boolean forward, double power){
|
||||
if(forward)
|
||||
hang.setDirection(DcMotorSimple.Direction.FORWARD);
|
||||
else if(!forward)
|
||||
hang.setDirection(DcMotorSimple.Direction.REVERSE);
|
||||
hang.setPower(power);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -91,6 +91,7 @@ public class HookTest extends OpMode {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user