teleop Command
fun SwerveDrive.teleopCommand(xSupplier: () -> Double, ySupplier: () -> Double, rotSupplier: () -> Double, fieldOriented: Boolean = true, block: TeleopSwerve.Config.() -> Unit = {}): Command
Creates a teleop swerve command with DSL configuration.
Usage Example:
val teleopCommand = drive.teleopCommand(
xSupplier = { controller.leftY },
ySupplier = { controller.leftX },
rotSupplier = { controller.rightX }
) {
deadband = 0.05
inputExponent = 2.0
enableSlewRateLimiting = true
}Content copied to clipboard