Class 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 system
      double getRate()
      Get the maximum amount of change allowed by the system
      void 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
      • Methods inherited from class java.lang.Object

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

      • SlewLimiter

        public SlewLimiter​(double limit)
        Built a SlewLimier object
        Parameters:
        limit - Maximum amount of change allowed by the system (lower numbers will be more aggressive)
    • 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