Autoclaw added
This commit is contained in:
@ -192,7 +192,7 @@ public class CometBotDriveV2 extends OpMode {
|
|||||||
wrist.toReverseBucket();
|
wrist.toReverseBucket();
|
||||||
}
|
}
|
||||||
if(runtime.seconds() > 12.75) {
|
if(runtime.seconds() > 12.75) {
|
||||||
claw.openClaw();
|
claw.autoOpenClaw();
|
||||||
state = 6;
|
state = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -205,7 +205,7 @@ public class CometBotDriveV2 extends OpMode {
|
|||||||
wrist.toReverseBucket();
|
wrist.toReverseBucket();
|
||||||
}
|
}
|
||||||
if(runtime.seconds() > 23.00) {
|
if(runtime.seconds() > 23.00) {
|
||||||
claw.openClaw();
|
claw.autoOpenClaw();
|
||||||
state = 10;
|
state = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@ public class CometBotDriveV2 extends OpMode {
|
|||||||
wrist.toReverseBucket();
|
wrist.toReverseBucket();
|
||||||
}
|
}
|
||||||
if (runtime.seconds() > 3.5) {
|
if (runtime.seconds() > 3.5) {
|
||||||
claw.openClaw();
|
claw.autoOpenClaw();
|
||||||
}
|
}
|
||||||
if (runtime.seconds() > 4) {
|
if (runtime.seconds() > 4) {
|
||||||
wrist.toTravelPosition();
|
wrist.toTravelPosition();
|
||||||
@ -247,9 +247,7 @@ public class CometBotDriveV2 extends OpMode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void moveToPickupAgainPath5() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void moveToParkPath6() {
|
private void moveToParkPath6() {
|
||||||
if (runtime.seconds() > 24.5) {
|
if (runtime.seconds() > 24.5) {
|
||||||
|
@ -6,7 +6,7 @@ import com.acmerobotics.dashboard.config.Config;
|
|||||||
public class RobotConstants {
|
public class RobotConstants {
|
||||||
public final static double clawClose = 0.95;
|
public final static double clawClose = 0.95;
|
||||||
public final static double clawOpen = 0.35;
|
public final static double clawOpen = 0.35;
|
||||||
|
public final static int autoClawOpen = 0;
|
||||||
|
|
||||||
|
|
||||||
public final static double armFloor = 0.7;
|
public final static double armFloor = 0.7;
|
||||||
|
@ -4,6 +4,7 @@ import static org.firstinspires.ftc.teamcode.PedroConstants.CLAW_NAME;
|
|||||||
import static org.firstinspires.ftc.teamcode.PedroConstants.THUMB_SERVO;
|
import static org.firstinspires.ftc.teamcode.PedroConstants.THUMB_SERVO;
|
||||||
import static org.firstinspires.ftc.teamcode.configs.RobotConstants.clawClose;
|
import static org.firstinspires.ftc.teamcode.configs.RobotConstants.clawClose;
|
||||||
import static org.firstinspires.ftc.teamcode.configs.RobotConstants.clawOpen;
|
import static org.firstinspires.ftc.teamcode.configs.RobotConstants.clawOpen;
|
||||||
|
import static org.firstinspires.ftc.teamcode.configs.RobotConstants.autoClawOpen;
|
||||||
import static org.firstinspires.ftc.teamcode.configs.RobotConstants.grabBlueberry;
|
import static org.firstinspires.ftc.teamcode.configs.RobotConstants.grabBlueberry;
|
||||||
|
|
||||||
import com.qualcomm.robotcore.hardware.HardwareMap;
|
import com.qualcomm.robotcore.hardware.HardwareMap;
|
||||||
@ -12,7 +13,7 @@ import com.qualcomm.robotcore.hardware.Servo;
|
|||||||
public class ClawSubsystem {
|
public class ClawSubsystem {
|
||||||
|
|
||||||
public enum ClawState {
|
public enum ClawState {
|
||||||
CLOSED, OPEN, GRAB_BLUEBERRY
|
CLOSED, OPEN, GRAB_BLUEBERRY, AUTO_OPEN
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ThumbState {
|
public enum ThumbState {
|
||||||
@ -32,6 +33,7 @@ public class ClawSubsystem {
|
|||||||
claw.setPosition(grabBlueberry);
|
claw.setPosition(grabBlueberry);
|
||||||
state = ClawState.GRAB_BLUEBERRY;
|
state = ClawState.GRAB_BLUEBERRY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeClaw() {
|
public void closeClaw() {
|
||||||
claw.setPosition(clawClose);
|
claw.setPosition(clawClose);
|
||||||
|
|
||||||
@ -43,6 +45,11 @@ public class ClawSubsystem {
|
|||||||
|
|
||||||
state = ClawState.OPEN;
|
state = ClawState.OPEN;
|
||||||
}
|
}
|
||||||
|
public void autoOpenClaw() {
|
||||||
|
claw.setPosition(autoClawOpen);
|
||||||
|
|
||||||
|
state = ClawState.AUTO_OPEN;
|
||||||
|
}
|
||||||
|
|
||||||
public ClawState getState() {
|
public ClawState getState() {
|
||||||
return state;
|
return state;
|
||||||
|
Reference in New Issue
Block a user