Class RampingSpeedController

  • All Implemented Interfaces:
    ComposedComponent<edu.wpi.first.wpilibj.SpeedController>, edu.wpi.first.wpilibj.SpeedController

    public class RampingSpeedController
    extends java.lang.Object
    implements edu.wpi.first.wpilibj.SpeedController, ComposedComponent<edu.wpi.first.wpilibj.SpeedController>
    A SpeedController implementation which enforces a maximum change in target speed. When run in a loop, this results in software-controlled acceleration profiles for the composed speed controller.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  RampingSpeedController.Builder
      A Builder for RampingSpeedControllers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void disable()
      double get()
      java.util.Collection<edu.wpi.first.wpilibj.SpeedController> getComposedComponents()
      Get the composed components within this one.
      boolean getInverted()  
      void set​(double speed)
      void setInverted​(boolean inverted)  
      void stopMotor()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface edu.wpi.first.wpilibj.SpeedController

        setVoltage
    • Method Detail

      • get

        public double get()
        Specified by:
        get in interface edu.wpi.first.wpilibj.SpeedController
      • set

        public void set​(double speed)
        Specified by:
        set in interface edu.wpi.first.wpilibj.SpeedController
      • disable

        public void disable()
        Specified by:
        disable in interface edu.wpi.first.wpilibj.SpeedController
      • getComposedComponents

        public java.util.Collection<edu.wpi.first.wpilibj.SpeedController> getComposedComponents()
        Get the composed components within this one.
        Specified by:
        getComposedComponents in interface ComposedComponent<edu.wpi.first.wpilibj.SpeedController>
        Returns:
        the composed components.
      • setInverted

        public void setInverted​(boolean inverted)
        Specified by:
        setInverted in interface edu.wpi.first.wpilibj.SpeedController
      • getInverted

        public boolean getInverted()
        Specified by:
        getInverted in interface edu.wpi.first.wpilibj.SpeedController
      • stopMotor

        public void stopMotor()
        Specified by:
        stopMotor in interface edu.wpi.first.wpilibj.SpeedController