Motors on GP1, Arm on GP2

This commit is contained in:
2024-11-11 19:28:16 -08:00
parent 6ccedc49b0
commit 10e6bed4ca

View File

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