From ba48226eef15e99cdbe86185c27c9bab4facba78 Mon Sep 17 00:00:00 2001 From: Braelyn Date: Fri, 25 Oct 2024 17:44:31 -0700 Subject: [PATCH] added increment in a couple places, refactored names to match --- .../subsystems/HorizontalSlidesSubsystem.java | 14 +++++------ .../subsystems/VerticalSlidesSubsystem.java | 24 ++++++++++++------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/HorizontalSlidesSubsystem.java b/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/HorizontalSlidesSubsystem.java index 3886112..09332f3 100644 --- a/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/HorizontalSlidesSubsystem.java +++ b/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/HorizontalSlidesSubsystem.java @@ -24,9 +24,9 @@ public class HorizontalSlidesSubsystem implements Subsystem, Loggable { public static double LinkServoRetract = 0; public static double ClawServoClose = 0.55; public static double ClawServoOpen = 0; - public static double ClawWristServoTransfer = 0.545; - public static double ClawWristServoPickup = 0.05; - public static double ClawWristServoIncrement = 0.555; + public static double WristServoTransfer = 0.545; + public static double WristServoPickup = 0.05; + public static double WristServoIncrement = 0.555; @Log(name = "wristTarget") public double wristTargetPos; @@ -38,7 +38,7 @@ public class HorizontalSlidesSubsystem implements Subsystem, Loggable { private boolean isHardware; public HorizontalSlidesSubsystem(Hardware hw) { - clawwristServo = hw.wristservo; + wristServo = hw.wristservo; clawServo = hw.clawservo; linkServo = hw.linkservo; @@ -51,7 +51,7 @@ public HorizontalSlidesSubsystem(Hardware hw) { public HorizontalSlidesSubsystem() { isHardware = false; linkServo = null; - clawwristServo = null; + wristServo = null; clawServo = null; } @@ -74,12 +74,12 @@ public void ClawServoBigOpen() { } public void ClawWristServoPickup() { - clawwristServo.setPosition(ClawWristServoPickup); //lowers claw to intake + wristServo.setPosition(WristServoPickup); //lowers claw to intake } public void ClawWristServoTransfer() { // positions for the arm of the bot for transfer - clawwristServo.setPosition(ClawWristServoTransfer); + wristServo.setPosition(WristServoTransfer); } public void ClawWristServoIncrement() { diff --git a/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/VerticalSlidesSubsystem.java b/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/VerticalSlidesSubsystem.java index 630d899..0f407f1 100644 --- a/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/VerticalSlidesSubsystem.java +++ b/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/VerticalSlidesSubsystem.java @@ -22,7 +22,7 @@ public class VerticalSlidesSubsystem implements Subsystem, Loggable { public static double LOW_BUCKET = -950; public static double HIGH_BUCKET = -1350; // public static double HIGH_POS = 1000; - public static double WRIST_POS = 0; + public static double SLIDE_POS = 0; public static double ARM_POS = 0; public static double MIN_MOTOR_SPEED = -0.7; public static double MAX_MOTOR_SPEED = 1; @@ -48,11 +48,11 @@ public class VerticalSlidesSubsystem implements Subsystem, Loggable { @Log(name = "slideTarget") public int slideTargetPos; - @Log(name = "wristPos") - public double wristPos; - @Log(name = "wristTarget") - public double wristTargetPos; + @Log(name = "armTarget") + public double armTargetPos; + @Log(name = "bucketTarget") + public double bucketTargetPos; public static PIDCoefficients PID = new PIDCoefficients(0.0, 0.0, 0.0); public Servo armServo; @@ -98,10 +98,10 @@ private void setSlidePos(int e) { slideTargetPos = e; } - private void setWristPos(double w) { + private void setArmPos(double w) { if (armServo != null) { armServo.setPosition(w); - wristTargetPos = w; + armTargetPos = w; } } @@ -160,7 +160,7 @@ public void SlideChamberHigh() { public void LiftHeightIntake() { //brings the arm all the way down - slidePidController.setTargetPosition(WRIST_POS); + slidePidController.setTargetPosition(SLIDE_POS); // armServo.setPosition(0); // scoreServo.setPosition(0); } @@ -171,7 +171,7 @@ private void setSlideMotorPower(double speed) { } } - public void BucketWristServoIncrement() { + public void BucketServoIncrement() { // the arm's position to score armServo.setPosition(WristServoIncrement); } @@ -203,4 +203,10 @@ public void ArmServoHighBucket() { // positions for the arm of the bot armServo.setPosition(ArmServoInput); } + private void setBucketPos(double w) { + if (bucketServo != null) { + bucketServo.setPosition(w); + bucketTargetPos = w; + } + } }