From 9a426a8f8a322873fc677b7138bd74df93318a92 Mon Sep 17 00:00:00 2001 From: OnDYCLaptop Date: Mon, 9 Mar 2026 09:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A82.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/frc/robot/RobotContainer.java | 3 ++- src/main/java/frc/robot/controls/IntakerControls.java | 2 +- src/main/java/frc/robot/controls/ShooterControls.java | 4 ++++ .../frc/robot/subsystems/CommandSwerveDrivetrain.java | 8 ++++---- src/main/java/frc/robot/subsystems/IntakerSubsystem.java | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index f2868a7..eaabbdb 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -162,6 +162,7 @@ public class RobotContainer { controllerupper.povDown().onTrue(Commands.runOnce(() -> shooterControls.adjustBackboardRateOffset(-100))); controllerupper.back().onTrue(Commands.runOnce(() -> shooterControls.resetOffsets())); controllerupper.start().onTrue(Commands.runOnce(() -> shooterControls.resetBackboardCommand())); + controllerupper.b().onTrue(Commands.runOnce(() -> shooterControls.resetBackboardCommand())); } /* ====================== */ /* LED 绑定 */ @@ -187,7 +188,7 @@ public class RobotContainer { private void configueClimber() { enableTrigger.onTrue(climberControls.enableInitCommand()); climberSubsystem.setDefaultCommand(climberControls.defaultClimberCommand()); - controllerupper.b().onTrue(climberControls.resetClimberEncoderCommand(climberSubsystem)); + //controllerupper.b().onTrue(climberControls.resetClimberEncoderCommand(climberSubsystem)); } private void configueIntaker() { diff --git a/src/main/java/frc/robot/controls/IntakerControls.java b/src/main/java/frc/robot/controls/IntakerControls.java index 687eff4..aabc875 100644 --- a/src/main/java/frc/robot/controls/IntakerControls.java +++ b/src/main/java/frc/robot/controls/IntakerControls.java @@ -73,7 +73,7 @@ public class IntakerControls { public Command defaultIntakerCommand() { return Commands.run(() -> { double getterspeed = 0; - double conveyoyspeedforintake = 15; + double conveyoyspeedforintake = 0; double statorCurrent = ShooterSubsystem.getConveyorStatorCurrent(); if (controller.getLeftTriggerAxis() > 0.1) { diff --git a/src/main/java/frc/robot/controls/ShooterControls.java b/src/main/java/frc/robot/controls/ShooterControls.java index 9434e3f..d2db669 100644 --- a/src/main/java/frc/robot/controls/ShooterControls.java +++ b/src/main/java/frc/robot/controls/ShooterControls.java @@ -147,4 +147,8 @@ public class ShooterControls { flywheelSpeedOffset = 0.0; backboardPositionOffset = 0.0; } + public void startconveyor(){ + shooterSubsystem.setConveyorSpeedByRPS(10); + + } } \ No newline at end of file diff --git a/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java b/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java index f835e94..a70c641 100644 --- a/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java +++ b/src/main/java/frc/robot/subsystems/CommandSwerveDrivetrain.java @@ -163,7 +163,7 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su public void forceUsingLimelightmt2() { LimelightHelpers.PoseEstimate mt2 = - LimelightHelpers.getBotPoseEstimate_wpiBlue_MegaTag2(Constants.Limelight.LIMELIGHT_NAME_Shooter); + LimelightHelpers.getBotPoseEstimate_wpiBlue(Constants.Limelight.LIMELIGHT_NAME_Shooter); if (mt2 == null || mt2.tagCount == 0) { return; @@ -258,7 +258,7 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su private LimelightHelpers.PoseEstimate getLimelightPoseEstimate(String limelightName) { if (Constants.Limelight.UsingMetaTag2) { - return LimelightHelpers.getBotPoseEstimate_wpiBlue_MegaTag2(limelightName); + return LimelightHelpers.getBotPoseEstimate_wpiBlue(limelightName); } return LimelightHelpers.getBotPoseEstimate_wpiBlue(limelightName); } @@ -415,8 +415,8 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su Pose2d pose = getState().Pose; m_field.setRobotPose(pose); posePub.set(pose); - shooter_ll_field.setRobotPose(LimelightHelpers.getBotPoseEstimate_wpiBlue_MegaTag2(Constants.Limelight.LIMELIGHT_NAME_Shooter).pose); - intaker_ll_field.setRobotPose(LimelightHelpers.getBotPoseEstimate_wpiBlue_MegaTag2(Constants.Limelight.LIMELIGHT_NAME_Intaker).pose); + shooter_ll_field.setRobotPose(LimelightHelpers.getBotPoseEstimate_wpiBlue(Constants.Limelight.LIMELIGHT_NAME_Shooter).pose); + intaker_ll_field.setRobotPose(LimelightHelpers.getBotPoseEstimate_wpiBlue(Constants.Limelight.LIMELIGHT_NAME_Intaker).pose); driveNetworkTable.getEntry("YawFromState").setDouble(getState().Pose.getRotation().getDegrees()); driveNetworkTable.getEntry("DriveMode").setString(m_driveMode.name()); driveNetworkTable.getEntry("IsFieldCentric").setBoolean(m_driveMode == DriveMode.FIELD_CENTRIC); diff --git a/src/main/java/frc/robot/subsystems/IntakerSubsystem.java b/src/main/java/frc/robot/subsystems/IntakerSubsystem.java index 04f7a86..f1603fd 100644 --- a/src/main/java/frc/robot/subsystems/IntakerSubsystem.java +++ b/src/main/java/frc/robot/subsystems/IntakerSubsystem.java @@ -97,7 +97,7 @@ public class IntakerSubsystem extends SubsystemBase{ double currentPosition = getIntakerotaterPosition(); if (currentPosition < Constants.Intaker.intakeRotaterUpLimit) { // move up while below the upper limit - intakerotater.set(0.2); + intakerotater.set(0.3); } else { // at or above upper limit: stop stopIntakerotater();