mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-27 07:01:39 +00:00
Updated Javadocs, added ability to push offset to absolute encoders.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package swervelib.encoders;
|
||||
|
||||
import com.reduxrobotics.sensors.canandcoder.CANandcoder;
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
|
||||
/**
|
||||
* HELIUM {@link CANandcoder} from ReduxRobotics absolute encoder, attached through the CAN bus.
|
||||
@@ -78,6 +79,21 @@ public class CanAndCoderSwerve extends SwerveAbsoluteEncoder
|
||||
return encoder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cannot set the offset of the CanAndCoder.
|
||||
*
|
||||
* @param offset the offset the Absolute Encoder uses as the zero point.
|
||||
* @return always false due to CanAndCoder not supporting offset changing.
|
||||
*/
|
||||
@Override
|
||||
public boolean setAbsoluteEncoderOffset(double offset)
|
||||
{
|
||||
//CanAndCoder does not support Absolute Offset Changing
|
||||
DriverStation.reportWarning("Cannot Set Absolute Encoder Offset of CanAndCoders ID: " + encoder.getAddress(),
|
||||
false);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the velocity in degrees/sec.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user