Package frc.lib5k.control
Class SlewLimiter
- java.lang.Object
-
- frc.lib5k.control.SlewLimiter
-
- Direct Known Subclasses:
TimedSlewLimiter
public class SlewLimiter extends java.lang.ObjectA tool for smoothing out joystick information (enforces a maximum rate of change)
-
-
Constructor Summary
Constructors Constructor Description SlewLimiter(double limit)Built a SlewLimier object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublefeed(double value)Limit a value, and update the systemdoublegetRate()Get the maximum amount of change allowed by the systemvoidreset()Reset the system (stops accidental movement after a system restart)voidsetRate(double rate)Re-set the maximum amount of change allowed by the system
-
-
-
Method Detail
-
feed
public double feed(double value)
Limit a value, and update the system- Parameters:
value- Input value- Returns:
- Output value
-
reset
public void reset()
Reset the system (stops accidental movement after a system restart)
-
setRate
public void setRate(double rate)
Re-set the maximum amount of change allowed by the system- Parameters:
rate- Maximum change
-
getRate
public double getRate()
Get the maximum amount of change allowed by the system- Returns:
- Maximum change
-
-