mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Clean up Java warning suppressions (#4433)
Checkstyle naming conventions were changed to allow most of what's in wpimath. Naming rules were disabled completely in wpimath since almost all suppressions are for math notation.
This commit is contained in:
@@ -98,7 +98,6 @@ public class Drivetrain {
|
||||
* @param xSpeed Linear velocity in m/s.
|
||||
* @param rot Angular velocity in rad/s.
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double rot) {
|
||||
var wheelSpeeds = m_kinematics.toWheelSpeeds(new ChassisSpeeds(xSpeed, 0.0, rot));
|
||||
setSpeeds(wheelSpeeds);
|
||||
|
||||
@@ -108,7 +108,6 @@ public class Drivetrain {
|
||||
* @param xSpeed Linear velocity in m/s.
|
||||
* @param rot Angular velocity in rad/s.
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double rot) {
|
||||
var wheelSpeeds = m_kinematics.toWheelSpeeds(new ChassisSpeeds(xSpeed, 0.0, rot));
|
||||
setSpeeds(wheelSpeeds);
|
||||
|
||||
@@ -8,7 +8,6 @@ import edu.wpi.first.wpilibj.DutyCycleEncoder;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
|
||||
@SuppressWarnings("PMD.SingularField")
|
||||
public class Robot extends TimedRobot {
|
||||
private DutyCycleEncoder m_dutyCycleEncoder;
|
||||
|
||||
|
||||
@@ -9,15 +9,12 @@ import edu.wpi.first.wpilibj.DutyCycle;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
|
||||
@SuppressWarnings("PMD.SingularField")
|
||||
public class Robot extends TimedRobot {
|
||||
private DigitalInput m_input;
|
||||
private DutyCycle m_dutyCycle;
|
||||
|
||||
@Override
|
||||
public void robotInit() {
|
||||
m_input = new DigitalInput(0);
|
||||
m_dutyCycle = new DutyCycle(m_input);
|
||||
m_dutyCycle = new DutyCycle(new DigitalInput(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -114,7 +114,6 @@ public class Drivetrain {
|
||||
* @param rot Angular rate of the robot.
|
||||
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
|
||||
var mecanumDriveWheelSpeeds =
|
||||
m_kinematics.toWheelSpeeds(
|
||||
|
||||
@@ -113,7 +113,6 @@ public class DriveSubsystem extends SubsystemBase {
|
||||
* @param rot Angular rate of the robot.
|
||||
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
|
||||
if (fieldRelative) {
|
||||
m_drive.driveCartesian(ySpeed, xSpeed, rot, -m_gyro.getAngle());
|
||||
|
||||
@@ -126,7 +126,6 @@ public class Drivetrain {
|
||||
* @param rot Angular rate of the robot.
|
||||
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
|
||||
var mecanumDriveWheelSpeeds =
|
||||
m_kinematics.toWheelSpeeds(
|
||||
|
||||
@@ -99,7 +99,6 @@ public class Drivetrain {
|
||||
* @param xSpeed Linear velocity in m/s.
|
||||
* @param rot Angular velocity in rad/s.
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double rot) {
|
||||
var wheelSpeeds = m_kinematics.toWheelSpeeds(new ChassisSpeeds(xSpeed, 0.0, rot));
|
||||
setSpeeds(wheelSpeeds);
|
||||
|
||||
@@ -113,7 +113,6 @@ public class Drivetrain {
|
||||
* @param xSpeed the speed for the x axis
|
||||
* @param rot the rotation
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double rot) {
|
||||
setSpeeds(m_kinematics.toWheelSpeeds(new ChassisSpeeds(xSpeed, 0, rot)));
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@ public class Robot extends TimedRobot {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
public void teleopPeriodic() {
|
||||
// Get the x speed. We are inverting this because Xbox controllers return
|
||||
// negative values when we push forward.
|
||||
|
||||
@@ -46,7 +46,6 @@ public class Drivetrain {
|
||||
* @param rot Angular rate of the robot.
|
||||
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
|
||||
var swerveModuleStates =
|
||||
m_kinematics.toSwerveModuleStates(
|
||||
|
||||
@@ -99,7 +99,6 @@ public class DriveSubsystem extends SubsystemBase {
|
||||
* @param rot Angular rate of the robot.
|
||||
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
|
||||
var swerveModuleStates =
|
||||
DriveConstants.kDriveKinematics.toSwerveModuleStates(
|
||||
|
||||
@@ -58,7 +58,6 @@ public class Drivetrain {
|
||||
* @param rot Angular rate of the robot.
|
||||
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
|
||||
*/
|
||||
@SuppressWarnings("ParameterName")
|
||||
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
|
||||
var swerveModuleStates =
|
||||
m_kinematics.toSwerveModuleStates(
|
||||
|
||||
Reference in New Issue
Block a user