mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Updated Javadocs, added ability to push offset to absolute encoders.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user