Package frc.lib5k.control
Class SlewLimiter
- java.lang.Object
-
- frc.lib5k.control.SlewLimiter
-
- Direct Known Subclasses:
TimedSlewLimiter
public class SlewLimiter extends java.lang.Object
A 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 double
feed(double value)
Limit a value, and update the systemdouble
getRate()
Get the maximum amount of change allowed by the systemvoid
reset()
Reset the system (stops accidental movement after a system restart)void
setRate(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
-
-