Class 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 system
      void setRate​(double secondsToFull)
      Set the ramp rate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimedSlewLimiter

        public TimedSlewLimiter​(double secondsToFull)
        Create a TimedSlewLimiter
        Parameters:
        secondsToFull - Minimum desired time to go from neutral to full output
    • Method Detail

      • setRate

        public void setRate​(double secondsToFull)
        Set the ramp rate
        Overrides:
        setRate in class SlewLimiter
        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 class SlewLimiter
        Parameters:
        value - Input value
        Returns:
        Output value