From 39b03539551bc68932a441f94710ad66e4e2330a Mon Sep 17 00:00:00 2001 From: Logan Hollowood <98189655+GearBoxFox@users.noreply.github.com> Date: Wed, 31 Jul 2024 18:05:34 -0400 Subject: [PATCH] removed comments, disable always use vision --- .../java/frc/robot/subsystems/drive/DriveSubsystem.java | 7 ++++--- .../frc/robot/subsystems/drive/module/ModuleIOTalonFX.java | 3 --- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/drive/DriveSubsystem.java b/src/main/java/frc/robot/subsystems/drive/DriveSubsystem.java index 4847f40..199d04d 100644 --- a/src/main/java/frc/robot/subsystems/drive/DriveSubsystem.java +++ b/src/main/java/frc/robot/subsystems/drive/DriveSubsystem.java @@ -333,10 +333,11 @@ public void periodic() { module.stop(); } } + // Log empty setpoint states when disabled if (DriverStation.isDisabled()) { -// Logger.recordOutput("SwerveStates/Setpoints"); -// Logger.recordOutput("SwerveStates/SetpointsOptimized"); + Logger.recordOutput("SwerveStates/Setpoints"); + Logger.recordOutput("SwerveStates/SetpointsOptimized"); } // Update odometry @@ -348,7 +349,7 @@ public void periodic() { Units.inchesToMeters(6.0)) == 0.0) && (MathUtil.applyDeadband(kinematics.toChassisSpeeds(getModuleStates()).omegaRadiansPerSecond, Units.degreesToRadians(7.5)) == 0.0)) - || !DriverStation.isAutonomousEnabled() || true) { + || !DriverStation.isAutonomousEnabled()) { camera.getPose(m_wpiPoseEstimator.getEstimatedPosition()).ifPresent( (PoseEstimator.TimestampedVisionUpdate pose) -> diff --git a/src/main/java/frc/robot/subsystems/drive/module/ModuleIOTalonFX.java b/src/main/java/frc/robot/subsystems/drive/module/ModuleIOTalonFX.java index 95305bf..3a3897b 100644 --- a/src/main/java/frc/robot/subsystems/drive/module/ModuleIOTalonFX.java +++ b/src/main/java/frc/robot/subsystems/drive/module/ModuleIOTalonFX.java @@ -245,9 +245,6 @@ public void setDriveVelocityMPS(double mps) { double rps = (mps / m_moduleConstants.WHEEL_CURCUMFERENCE_METERS()) * m_moduleConstants.DRIVE_GEAR_RATIO(); VelocityVoltage velRequest = new VelocityVoltage(rps).withSlot(0).withEnableFOC(false); m_driveTalon.setControl(velRequest.withVelocity(rps)); - -// double output = mps / Constants.DriveConstants.MAX_LINEAR_SPEED; -// m_driveTalon.setVoltage(output * 12.0); } @Override