From 83f26089349d0403ff0887a51749578264ebefaa Mon Sep 17 00:00:00 2001 From: FTC16750 Date: Sat, 2 Nov 2024 18:16:23 -0700 Subject: [PATCH] 16750 Horizontal slides done - is working - Maggie --- .../slides/HorizontalSlidesCommands.java | 8 ++---- .../controls/OperatorController.java | 28 +++++++++---------- .../subsystems/HorizontalSlidesSubsystem.java | 4 +-- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/commands/slides/HorizontalSlidesCommands.java b/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/commands/slides/HorizontalSlidesCommands.java index 2425a0d..a4590f9 100644 --- a/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/commands/slides/HorizontalSlidesCommands.java +++ b/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/commands/slides/HorizontalSlidesCommands.java @@ -2,6 +2,7 @@ import com.technototes.library.command.Command; import com.technototes.library.command.SequentialCommandGroup; +import com.technototes.library.command.WaitCommand; import org.firstinspires.ftc.sixteen750.Robot; public class HorizontalSlidesCommands { @@ -43,11 +44,7 @@ public static SequentialCommandGroup transferring(Robot r) { r.horizontalSlidesSubsystem::ClawWristServoTransfer, r.horizontalSlidesSubsystem ), - Command.create(r.horizontalSlidesSubsystem::slidesin, r.horizontalSlidesSubsystem), - Command.create( - r.horizontalSlidesSubsystem::ClawServoBigOpen, - r.horizontalSlidesSubsystem - ) + Command.create(r.horizontalSlidesSubsystem::slidesin, r.horizontalSlidesSubsystem) // commands for vertical slide bucket transfer position first, then wrist transferring ); } @@ -80,6 +77,7 @@ public static SequentialCommandGroup intake(Robot r) { r.horizontalSlidesSubsystem ), Command.create(r.horizontalSlidesSubsystem::slidesout, r.horizontalSlidesSubsystem), + new WaitCommand(1), Command.create( r.horizontalSlidesSubsystem::ClawWristServoPickup, r.horizontalSlidesSubsystem diff --git a/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/controls/OperatorController.java b/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/controls/OperatorController.java index 0a59b18..6a36c92 100644 --- a/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/controls/OperatorController.java +++ b/Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/controls/OperatorController.java @@ -32,15 +32,15 @@ public OperatorController(CommandGamepad g, Robot r) { } private void AssignNamedControllerButton() { - openClaw = gamepad.ps_circle; - closeClaw = gamepad.ps_cross; - wristTransfer = gamepad.ps_triangle; - wristPickup = gamepad.ps_square; - wristIncrement = gamepad.dpadRight; - wristDecrement = gamepad.dpadLeft; + openClaw = gamepad.rightBumper; + closeClaw = gamepad.leftBumper; + //wristTransfer = gamepad.ps_triangle; + //wristPickup = gamepad.ps_square; + //wristIncrement = gamepad.dpadRight; + //wristDecrement = gamepad.dpadLeft; horislidesLeftStick = gamepad.leftStick; - horislidesExtend = gamepad.dpadUp; - horislidesRetract = gamepad.dpadDown; + horislidesExtend = gamepad.ps_triangle; + horislidesRetract = gamepad.ps_cross; } private void BindButtons() { @@ -54,12 +54,12 @@ private void BindButtons() { private void bindHorizontalSlidesControls() { openClaw.whenPressed(HorizontalSlidesCommands.clawOpen(robot)); closeClaw.whenPressed(HorizontalSlidesCommands.clawChomp(robot)); - wristPickup.whenPressed(HorizontalSlidesCommands.wristPickup(robot)); - wristTransfer.whenPressed(HorizontalSlidesCommands.wristTransfer(robot)); - wristIncrement.whenPressed(HorizontalSlidesCommands.wristIncrement(robot)); - wristDecrement.whenPressed(HorizontalSlidesCommands.wristDecrement(robot)); - horislidesExtend.whenPressed(HorizontalSlidesCommands.horizontalExtend(robot)); - horislidesRetract.whenPressed(HorizontalSlidesCommands.horizontalRetract(robot)); + //wristPickup.whenPressed(HorizontalSlidesCommands.wristPickup(robot)); + //wristTransfer.whenPressed(HorizontalSlidesCommands.wristTransfer(robot)); + //wristIncrement.whenPressed(HorizontalSlidesCommands.wristIncrement(robot)); + //wristDecrement.whenPressed(HorizontalSlidesCommands.wristDecrement(robot)); + horislidesExtend.whenPressed(HorizontalSlidesCommands.intake(robot)); + horislidesRetract.whenPressed(HorizontalSlidesCommands.transferring(robot)); } public void bindHorizontalAnalogControls() { 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 6c59754..8173f0e 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 @@ -26,8 +26,8 @@ public class HorizontalSlidesSubsystem implements Subsystem, Loggable { public static double LinkServoExtend = 0.6; public static double LinkServoRetract = 1; - public static double ClawServoClose = 0.1; - public static double ClawServoOpen = 0.5; + public static double ClawServoClose = 0.3; + public static double ClawServoOpen = 0.8; public static double WristServoTransfer = 0.3; public static double WristServoPickup = 1; public static double WristServoIncrement = 0.555;