Updated to 2024.4.8.3

This commit is contained in:
thenetworkgrinch
2024-02-12 18:59:40 -06:00
parent 78349d6f2d
commit 74ac1351ef
117 changed files with 536 additions and 438 deletions

View File

@@ -35,6 +35,14 @@ public class SparkMaxEncoderSwerve extends SwerveAbsoluteEncoder
*/
public SparkMaxEncoderSwerve(SwerveMotor motor, int conversionFactor)
{
failureConfiguring = new Alert(
"Encoders",
"Failure configuring SparkMax Analog Encoder",
Alert.AlertType.WARNING_TRACE);
offsetFailure = new Alert(
"Encoders",
"Failure to set Absolute Encoder Offset",
Alert.AlertType.WARNING_TRACE);
if (motor.getMotor() instanceof CANSparkMax)
{
encoder = ((CANSparkMax) motor.getMotor()).getAbsoluteEncoder(Type.kDutyCycle);
@@ -44,14 +52,6 @@ public class SparkMaxEncoderSwerve extends SwerveAbsoluteEncoder
{
throw new RuntimeException("Motor given to instantiate SparkMaxEncoder is not a CANSparkMax");
}
failureConfiguring = new Alert(
"Encoders",
"Failure configuring SparkMax Analog Encoder",
Alert.AlertType.WARNING_TRACE);
offsetFailure = new Alert(
"Encoders",
"Failure to set Absolute Encoder Offset",
Alert.AlertType.WARNING_TRACE);
}
/**