mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Update
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user