Class DriveSignal


  • public class DriveSignal
    extends java.lang.Object
    A collection of differential drivebase motor values
    • Constructor Summary

      Constructors 
      Constructor Description
      DriveSignal​(double l, double r)
      Create a DriveSignal from values.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static DriveSignal fromArcadeInputs​(double speed, double rotation)
      Complete a very simple solve from [speed, rotation] to [L, R] vectors.
      double getL()
      Get the left value
      double getR()
      Get the right value
      void setL​(double l)
      Set the left value
      void setR​(double r)
      Set the right value
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • DriveSignal

        public DriveSignal​(double l,
                           double r)
        Create a DriveSignal from values. These do not have to be direct outputs
        Parameters:
        l - Left value
        r - Right value
    • Method Detail

      • fromArcadeInputs

        public static DriveSignal fromArcadeInputs​(double speed,
                                                   double rotation)
        Complete a very simple solve from [speed, rotation] to [L, R] vectors. This does not handle smoothing or normalization.
        Parameters:
        speed - Speed component
        rotation - Rotation component
        Returns:
        DriveSignal
      • getR

        public double getR()
        Get the right value
        Returns:
        Right value
      • setR

        public void setR​(double r)
        Set the right value
        Parameters:
        r - Right value
      • getL

        public double getL()
        Get the left value
        Returns:
        Left value
      • setL

        public void setL​(double l)
        Set the left value
        Parameters:
        l - Left value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object