mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Added support for CANandCoder
This commit is contained in:
@@ -68,6 +68,13 @@ public class ModuleJson
|
||||
SwerveMotor angleMotor = angle.createMotor(false);
|
||||
SwerveAbsoluteEncoder absEncoder = encoder.createEncoder(angleMotor);
|
||||
|
||||
// If the absolute encoder is attached.
|
||||
if (absEncoder == null)
|
||||
{
|
||||
absEncoder = angle.createIntegratedEncoder(angleMotor);
|
||||
angleMotor.setAbsoluteEncoder(absEncoder);
|
||||
}
|
||||
|
||||
return new SwerveModuleConfiguration(
|
||||
drive.createMotor(true),
|
||||
angleMotor,
|
||||
|
||||
Reference in New Issue
Block a user