mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +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:
@@ -14,7 +14,6 @@ import edu.wpi.first.math.numbers.N2;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class ControlAffinePlantInversionFeedforwardTest {
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
@Test
|
||||
void testCalculate() {
|
||||
ControlAffinePlantInversionFeedforward<N2, N1> feedforward =
|
||||
@@ -25,7 +24,6 @@ class ControlAffinePlantInversionFeedforwardTest {
|
||||
48.0, feedforward.calculate(VecBuilder.fill(2, 2), VecBuilder.fill(3, 3)).get(0, 0), 1e-6);
|
||||
}
|
||||
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
@Test
|
||||
void testCalculateState() {
|
||||
ControlAffinePlantInversionFeedforward<N2, N1> feedforward =
|
||||
@@ -36,7 +34,6 @@ class ControlAffinePlantInversionFeedforwardTest {
|
||||
48.0, feedforward.calculate(VecBuilder.fill(2, 2), VecBuilder.fill(3, 3)).get(0, 0), 1e-6);
|
||||
}
|
||||
|
||||
@SuppressWarnings("ParameterName")
|
||||
protected Matrix<N2, N1> getDynamics(Matrix<N2, N1> x, Matrix<N1, N1> u) {
|
||||
return Matrix.mat(Nat.N2(), Nat.N2())
|
||||
.fill(1.000, 0, 0, 1.000)
|
||||
@@ -44,7 +41,6 @@ class ControlAffinePlantInversionFeedforwardTest {
|
||||
.plus(VecBuilder.fill(0, 1).times(u));
|
||||
}
|
||||
|
||||
@SuppressWarnings("ParameterName")
|
||||
protected Matrix<N2, N1> getStateDynamics(Matrix<N2, N1> x) {
|
||||
return Matrix.mat(Nat.N2(), Nat.N2()).fill(1.000, 0, 0, 1.000).times(x);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDriveAccelerationLimiterTest {
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testLowLimits() {
|
||||
final double trackwidth = 0.9;
|
||||
final double dt = 0.005;
|
||||
@@ -137,7 +136,6 @@ class DifferentialDriveAccelerationLimiterTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testHighLimits() {
|
||||
final double trackwidth = 0.9;
|
||||
final double dt = 0.005;
|
||||
|
||||
@@ -15,7 +15,6 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
class ImplicitModelFollowerTest {
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testSameModel() {
|
||||
final double dt = 0.005;
|
||||
|
||||
@@ -58,7 +57,6 @@ class ImplicitModelFollowerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testSlowerRefModel() {
|
||||
final double dt = 0.005;
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import edu.wpi.first.math.numbers.N2;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class LinearPlantInversionFeedforwardTest {
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
@Test
|
||||
void testCalculate() {
|
||||
Matrix<N2, N2> A = Matrix.mat(Nat.N2(), Nat.N2()).fill(1, 0, 0, 1);
|
||||
|
||||
@@ -17,7 +17,6 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
class LinearQuadraticRegulatorTest {
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testLQROnElevator() {
|
||||
var motors = DCMotor.getVex775Pro(2);
|
||||
|
||||
@@ -38,7 +37,6 @@ class LinearQuadraticRegulatorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testFourMotorElevator() {
|
||||
var dt = 0.020;
|
||||
|
||||
@@ -55,7 +53,6 @@ class LinearQuadraticRegulatorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testLQROnArm() {
|
||||
var motors = DCMotor.getVex775Pro(2);
|
||||
|
||||
@@ -89,7 +86,6 @@ class LinearQuadraticRegulatorTest {
|
||||
* @param Aref Desired state matrix.
|
||||
* @param dtSeconds Discretization timestep in seconds.
|
||||
*/
|
||||
@SuppressWarnings({"LocalVariableName", "MethodTypeParameterName", "ParameterName"})
|
||||
<States extends Num, Inputs extends Num> Matrix<Inputs, States> getImplicitModelFollowingK(
|
||||
Matrix<States, States> A,
|
||||
Matrix<States, Inputs> B,
|
||||
@@ -114,7 +110,6 @@ class LinearQuadraticRegulatorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testMatrixOverloadsWithSingleIntegrator() {
|
||||
var A = Matrix.mat(Nat.N2(), Nat.N2()).fill(0, 0, 0, 0);
|
||||
var B = Matrix.mat(Nat.N2(), Nat.N2()).fill(1, 0, 0, 1);
|
||||
@@ -138,7 +133,6 @@ class LinearQuadraticRegulatorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testMatrixOverloadsWithDoubleIntegrator() {
|
||||
double Kv = 3.02;
|
||||
double Ka = 0.642;
|
||||
|
||||
@@ -40,7 +40,6 @@ class LinearSystemLoopTest {
|
||||
private final LinearSystemLoop<N2, N1, N1> m_loop =
|
||||
new LinearSystemLoop<>(m_plant, m_controller, m_observer, 12, 0.00505);
|
||||
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
private static void updateTwoState(
|
||||
LinearSystem<N2, N1, N1> plant, LinearSystemLoop<N2, N1, N1> loop, double noise) {
|
||||
Matrix<N1, N1> y = plant.calculateY(loop.getXHat(), loop.getU()).plus(VecBuilder.fill(noise));
|
||||
@@ -50,7 +49,6 @@ class LinearSystemLoopTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testStateSpaceEnabled() {
|
||||
m_loop.reset(VecBuilder.fill(0, 0));
|
||||
Matrix<N2, N1> references = VecBuilder.fill(2.0, 0.0);
|
||||
@@ -79,7 +77,6 @@ class LinearSystemLoopTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
void testFlywheelEnabled() {
|
||||
LinearSystem<N1, N1, N1> plant =
|
||||
LinearSystemId.createFlywheelSystem(DCMotor.getNEO(2), 0.00289, 1.0);
|
||||
|
||||
@@ -13,7 +13,6 @@ import edu.wpi.first.math.numbers.N1;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SimpleMotorFeedforwardTest {
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
@Test
|
||||
void testCalculate() {
|
||||
double Ks = 0.5;
|
||||
|
||||
Reference in New Issue
Block a user