Incorporate FIELD states
This commit is contained in:
@ -5,7 +5,7 @@ import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
|
|||||||
|
|
||||||
import org.firstinspires.ftc.teamcode.runmodes.DevTeleopRunMode;
|
import org.firstinspires.ftc.teamcode.runmodes.DevTeleopRunMode;
|
||||||
|
|
||||||
@TeleOp(name = "Dev Teleop", group = "Debug")
|
@TeleOp(name = "Dev Teleop Actions", group = "Debug")
|
||||||
public class DevTeleop extends OpMode {
|
public class DevTeleop extends OpMode {
|
||||||
|
|
||||||
public DevTeleopRunMode runMode;
|
public DevTeleopRunMode runMode;
|
||||||
|
@ -104,12 +104,14 @@ public class DevTeleopRunMode {
|
|||||||
*/
|
*/
|
||||||
public void theLift() {
|
public void theLift() {
|
||||||
if (this.currentGP1.b && !this.previousGP1.b) {
|
if (this.currentGP1.b && !this.previousGP1.b) {
|
||||||
|
if (fieldStates.getFieldLocation() == FieldStates.FieldLocation.FIELD) {
|
||||||
Actions.runBlocking(new SequentialAction(
|
Actions.runBlocking(new SequentialAction(
|
||||||
this.arm.toParkPosition,
|
this.arm.toParkPosition,
|
||||||
this.wrist.toBucketPosition
|
this.wrist.toBucketPosition
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Controller: 2
|
Controller: 2
|
||||||
@ -153,12 +155,14 @@ public class DevTeleopRunMode {
|
|||||||
*/
|
*/
|
||||||
public void theTravel(){
|
public void theTravel(){
|
||||||
if (this.currentGP2.dpad_down && !this.previousGP2.dpad_down){
|
if (this.currentGP2.dpad_down && !this.previousGP2.dpad_down){
|
||||||
fieldStates.setFieldLocation(FieldStates.FieldLocation.FIELD);
|
if (fieldStates.getFieldLocation() == FieldStates.FieldLocation.BUCKET) {
|
||||||
Actions.runBlocking(new SequentialAction(
|
Actions.runBlocking(new SequentialAction(
|
||||||
lift.toFloor,
|
lift.toFloor,
|
||||||
arm.toBucketPosition,
|
arm.toBucketPosition,
|
||||||
wrist.toFloorPosition
|
wrist.toFloorPosition
|
||||||
));
|
));
|
||||||
|
fieldStates.setFieldLocation(FieldStates.FieldLocation.FIELD);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user