Package dev.narlyx.tweetybird.Drivers
Class Mecanum
java.lang.Object
dev.narlyx.tweetybird.Drivers.Mecanum
- All Implemented Interfaces:
TweetyBird.Driver
A simple example driver for a Mecanum drivetrain setup.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Used to configure and start the driver. -
Constructor Summary
ConstructorsConstructorDescriptionMecanum
(Mecanum.Builder builder) Constructor used to setup all variables from builder. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setHeading
(double axial, double lateral, double yaw, double speed) This method will power all four motors based on a target Axial, Lateral, Yaw, and Speed inputvoid
This method will stop all of the motors and attempt to lock them in place
-
Constructor Details
-
Mecanum
Constructor used to setup all variables from builder.- Parameters:
builder
- Passed builder
-
-
Method Details
-
setHeading
public void setHeading(double axial, double lateral, double yaw, double speed) This method will power all four motors based on a target Axial, Lateral, Yaw, and Speed input- Specified by:
setHeading
in interfaceTweetyBird.Driver
- Parameters:
axial
- Value from -1 to 1 to favor the axial directionlateral
- Value from -1 to 1 to favor the lateral directionyaw
- Value from -1 to 1 to set rotationspeed
- Value from 0 to 1 to set how fast the bot will cary out axial and lateral
-
stopAndHold
public void stopAndHold()This method will stop all of the motors and attempt to lock them in place- Specified by:
stopAndHold
in interfaceTweetyBird.Driver
-