2.25初始

This commit is contained in:
OnDYCLaptop
2026-02-25 16:38:47 +08:00
parent b61b0d78b2
commit 5e85e5430e
4 changed files with 17 additions and 2 deletions
@@ -0,0 +1,12 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": []
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}
+1 -1
View File
@@ -12,7 +12,7 @@
"y": 4.61077032810271
},
"isLocked": false,
"linkedName": "StartingPointRed1"
"linkedName": null
},
{
"anchor": {
+1 -1
View File
@@ -53,7 +53,7 @@ public class RobotContainer {
private final DriveControls driveControls = new DriveControls(drivetrain, controller,robotStatusManager );
private final ShooterControls shooterControls = new ShooterControls(shooterSubsystem, controller,robotStatusManager);
private final ClimberControls climberControls = new ClimberControls(climberSubsystem, controller);
private final DriveGainsTuner driveGainsTuner = new DriveGainsTuner(drivetrain);
private ConfigTalonFXMotorTuner configFlywheelTuner = new ConfigTalonFXMotorTuner(shooterSubsystem.flywheelMotorLeft, "flywheel", Constants.Shooter.flyWheelSlot0Configs);
private ConfigTalonFXMotorTuner configConveyorTuner = new ConfigTalonFXMotorTuner(shooterSubsystem.conveyorMotor, "conveyor", Constants.Shooter.conveyorSlot0Configs);
@@ -116,6 +116,9 @@ public class ShooterSubsystem extends SubsystemBase {
double pidOutput = backboardPID.calculate(getBackboardPosition());
pidOutput = Math.max(-Constants.Shooter.backboardSpeedMax, Math.min(Constants.Shooter.backboardSpeedMax, pidOutput)); // 限制输出范围
shooterNetworkTable.getEntry("backboardPIDOutput").setDouble(pidOutput);
if (Math.abs(pidOutput) < 0.8) {
pidOutput = 0.0;
}//防止抖动
// // 设置背板电机的速度,根据PID输出进行调整
setBackboardSpeedByRPS(pidOutput);
}