This commit is contained in:
thenetworkgrinch
2024-06-12 15:10:29 -05:00
parent 8c3470f453
commit 2d992a453a
7 changed files with 60 additions and 39 deletions

View File

@@ -52,11 +52,6 @@ public class SparkMaxSwerve extends SwerveMotor
*/
private Supplier<Double> position;
/**
* An {@link Alert} for if there is an error configuring the motor.
*/
private Alert failureConfiguringAlert;
/**
* Initialize the swerve motor.
*
@@ -79,9 +74,6 @@ public class SparkMaxSwerve extends SwerveMotor
position = encoder::getPosition;
// Spin off configurations in a different thread.
// configureSparkMax(() -> motor.setCANTimeout(0)); // Commented out because it prevents feedback.
failureConfiguringAlert = new Alert("Motors",
"Failure configuring motor " + motor.getDeviceId(),
Alert.AlertType.WARNING_TRACE);
}
/**
@@ -109,7 +101,7 @@ public class SparkMaxSwerve extends SwerveMotor
return;
}
}
failureConfiguringAlert.set(true);
DriverStation.reportWarning("Failure configuring motor " + motor.getDeviceId(), true);
}
/**