Package frc.lib5k.kinematics
Class DriveSignal
- java.lang.Object
-
- frc.lib5k.kinematics.DriveSignal
-
public class DriveSignal extends java.lang.ObjectA 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 DriveSignalfromArcadeInputs(double speed, double rotation)Complete a very simple solve from [speed, rotation] to [L, R] vectors.doublegetL()Get the left valuedoublegetR()Get the right valuevoidsetL(double l)Set the left valuevoidsetR(double r)Set the right valuejava.lang.StringtoString()
-
-
-
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 componentrotation- 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:
toStringin classjava.lang.Object
-
-