Package frc.lib5k.control
Class TimedSlewLimiter
- java.lang.Object
-
- frc.lib5k.control.SlewLimiter
-
- frc.lib5k.control.TimedSlewLimiter
-
public class TimedSlewLimiter extends SlewLimiter
An extension of SlewLimiter that acts a bit more like TalonSRX's rampRate setting, and respects non 20ms periods
-
-
Constructor Summary
Constructors Constructor Description TimedSlewLimiter(double secondsToFull)
Create a TimedSlewLimiter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
feed(double value)
Limit a value, and update the system.void
setEnabled(boolean enabled)
Enable or disable the systemvoid
setRate(double secondsToFull)
Set the ramp rate-
Methods inherited from class frc.lib5k.control.SlewLimiter
getRate, reset
-
-
-
-
Method Detail
-
setRate
public void setRate(double secondsToFull)
Set the ramp rate- Overrides:
setRate
in classSlewLimiter
- Parameters:
secondsToFull
- Minimum desired time to go from neutral to full output
-
setEnabled
public void setEnabled(boolean enabled)
Enable or disable the system- Parameters:
enabled
- Should the system be enabled?
-
feed
public double feed(double value)
Limit a value, and update the system. NOTE: This will be much lower resolution than the TalonSRX built-in limiter, but we have yet to have problems with it.- Overrides:
feed
in classSlewLimiter
- Parameters:
value
- Input value- Returns:
- Output value
-
-