mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-21 06:31:40 +00:00
Added new SparkMAX analog encoder option, fixed 'none' absolute encoder type
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package swervelib.encoders;
|
||||
|
||||
import edu.wpi.first.wpilibj.AnalogInput;
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.RobotController;
|
||||
|
||||
/**
|
||||
@@ -89,4 +90,16 @@ public class AnalogAbsoluteEncoderSwerve extends SwerveAbsoluteEncoder
|
||||
{
|
||||
return encoder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the velocity in degrees/sec.
|
||||
*
|
||||
* @return velocity in degrees/sec.
|
||||
*/
|
||||
@Override
|
||||
public double getVelocity()
|
||||
{
|
||||
DriverStation.reportWarning("The Analog Absolute encoder may not report accurate velocities!",true);
|
||||
return encoder.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user