Updated Javadocs, added ability to push offset to absolute encoders.

This commit is contained in:
thenetworkgrinch
2023-12-12 10:48:54 -06:00
parent aef91407ea
commit f03926627d
123 changed files with 685 additions and 283 deletions

View File

@@ -91,6 +91,21 @@ public class AnalogAbsoluteEncoderSwerve extends SwerveAbsoluteEncoder
return encoder;
}
/**
* Cannot Set the offset of an Analog Absolute Encoder.
*
* @param offset the offset the Absolute Encoder uses as the zero point.
* @return Will always be false as setting the offset is unsupported of an Analog absolute encoder.
*/
@Override
public boolean setAbsoluteEncoderOffset(double offset)
{
//Do Nothing
DriverStation.reportWarning(
"Cannot Set Absolute Encoder Offset of Analog Encoders Channel #" + encoder.getChannel(), false);
return false;
}
/**
* Get the velocity in degrees/sec.
*
@@ -99,7 +114,7 @@ public class AnalogAbsoluteEncoderSwerve extends SwerveAbsoluteEncoder
@Override
public double getVelocity()
{
DriverStation.reportWarning("The Analog Absolute encoder may not report accurate velocities!",true);
DriverStation.reportWarning("The Analog Absolute encoder may not report accurate velocities!", true);
return encoder.getValue();
}
}