Motors on GP1, Arm on GP2
This commit is contained in:
@ -82,9 +82,9 @@ public class CometBotTeleopCompetition {
|
||||
this.toArmParkThenSwitchBetweenSubmarineAndFloorPosition();
|
||||
this.clawControl();
|
||||
|
||||
// this.motors.calculateTrajectory(this.GP1);
|
||||
follower.setTeleOpMovementVectors(-this.GP1.left_stick_y, -this.GP1.left_stick_x, -this.GP1.right_stick_x);
|
||||
follower.update();
|
||||
|
||||
this.telemetry.addData("Field State", this.fieldStates.getFieldLocation());
|
||||
this.telemetry.addData("Claw State", this.claw.getState());
|
||||
this.telemetry.addData("Claw Position", this.claw.getPosition());
|
||||
@ -100,7 +100,7 @@ public class CometBotTeleopCompetition {
|
||||
Action: On button press, Arm hovers the floor with wrist parallel to arm
|
||||
*/
|
||||
public void toHighBucketScore() {
|
||||
if (this.currentGP1.triangle && !this.previousGP1.triangle) {
|
||||
if (this.currentGP2.triangle && !this.previousGP2.triangle) {
|
||||
fieldStates.setFieldLocation(FieldStates.FieldLocation.BUCKET);
|
||||
Actions.runBlocking(new SequentialAction(
|
||||
this.wrist.toFloorPosition(),
|
||||
@ -123,7 +123,7 @@ public class CometBotTeleopCompetition {
|
||||
}
|
||||
|
||||
public void toLowBucketScore() {
|
||||
if (this.currentGP1.circle && !this.previousGP1.circle) {
|
||||
if (this.currentGP2.circle && !this.previousGP2.circle) {
|
||||
fieldStates.setFieldLocation(FieldStates.FieldLocation.BUCKET);
|
||||
Actions.runBlocking(new SequentialAction(
|
||||
this.wrist.toFloorPosition(),
|
||||
@ -146,19 +146,19 @@ public class CometBotTeleopCompetition {
|
||||
}
|
||||
|
||||
public void clawControl() {
|
||||
if (this.currentGP1.right_bumper && !this.previousGP1.right_bumper) {
|
||||
if (this.currentGP2.right_bumper && !this.previousGP2.right_bumper) {
|
||||
this.claw.switchState();
|
||||
}
|
||||
}
|
||||
|
||||
public void toArmParkPosition() {
|
||||
if (this.currentGP1.square && !this.previousGP1.square) {
|
||||
if (this.currentGP2.square && !this.previousGP2.square) {
|
||||
Actions.runBlocking(this.arm.toParkPosition());
|
||||
}
|
||||
}
|
||||
|
||||
public void toArmParkThenSwitchBetweenSubmarineAndFloorPosition() {
|
||||
if (this.currentGP1.cross && !previousGP1.cross) {
|
||||
if (this.currentGP2.cross && !previousGP2.cross) {
|
||||
if (this.arm.getState() == ArmActionsSubsystem.ArmState.PARK) {
|
||||
Actions.runBlocking(
|
||||
new SequentialAction(
|
||||
|
Reference in New Issue
Block a user