Skip to content

Commit

Permalink
removed comments, disable always use vision
Browse files Browse the repository at this point in the history
  • Loading branch information
GearBoxFox committed Jul 31, 2024
1 parent 10f83db commit 39b0353
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/main/java/frc/robot/subsystems/drive/DriveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39b0353

Please sign in to comment.