Package frc.lib5k.kinematics
Class DriveSignal
- java.lang.Object
-
- frc.lib5k.kinematics.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 valuedouble
getR()
Get the right valuevoid
setL(double l)
Set the left valuevoid
setR(double r)
Set the right valuejava.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-