mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Java optimization and formatting fixes (#4857)
This commit is contained in:
@@ -103,10 +103,7 @@ public final class CommandScheduler implements NTSendable, AutoCloseable {
|
||||
disable();
|
||||
cancelAll();
|
||||
});
|
||||
LiveWindow.setDisabledListener(
|
||||
() -> {
|
||||
enable();
|
||||
});
|
||||
LiveWindow.setDisabledListener(this::enable);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -117,11 +117,7 @@ public class MecanumControllerCommand extends CommandBase {
|
||||
m_desiredRotation =
|
||||
requireNonNullParam(desiredRotation, "desiredRotation", "MecanumControllerCommand");
|
||||
|
||||
m_maxWheelVelocityMetersPerSecond =
|
||||
requireNonNullParam(
|
||||
maxWheelVelocityMetersPerSecond,
|
||||
"maxWheelVelocityMetersPerSecond",
|
||||
"MecanumControllerCommand");
|
||||
m_maxWheelVelocityMetersPerSecond = maxWheelVelocityMetersPerSecond;
|
||||
|
||||
m_frontLeftController =
|
||||
requireNonNullParam(frontLeftController, "frontLeftController", "MecanumControllerCommand");
|
||||
@@ -258,11 +254,7 @@ public class MecanumControllerCommand extends CommandBase {
|
||||
m_desiredRotation =
|
||||
requireNonNullParam(desiredRotation, "desiredRotation", "MecanumControllerCommand");
|
||||
|
||||
m_maxWheelVelocityMetersPerSecond =
|
||||
requireNonNullParam(
|
||||
maxWheelVelocityMetersPerSecond,
|
||||
"maxWheelVelocityMetersPerSecond",
|
||||
"MecanumControllerCommand");
|
||||
m_maxWheelVelocityMetersPerSecond = maxWheelVelocityMetersPerSecond;
|
||||
|
||||
m_frontLeftController = null;
|
||||
m_rearLeftController = null;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class SelectCommand extends CommandBase {
|
||||
@Override
|
||||
public void initialize() {
|
||||
if (m_selector != null) {
|
||||
if (!m_commands.keySet().contains(m_selector.get())) {
|
||||
if (!m_commands.containsKey(m_selector.get())) {
|
||||
m_selectedCommand =
|
||||
new PrintCommand(
|
||||
"SelectCommand selector value does not correspond to" + " any command!");
|
||||
|
||||
Reference in New Issue
Block a user