SimpleManualModeWithSpeedModes

An abstract class that defines the methods for running a manual mode with speed modes for a robot with a mecanum drivetrain.

Parameters

params

the configuration object for manual control

T

the type of mecanum drivetrain

R

the type of robot with mecanum drivetrain

Constructors

Link copied to clipboard
constructor(params: SimpleManualModeWithSpeedModes.SimpleManualModeWithSpeedModesParams = SimpleManualModeWithSpeedModesParams(), manualParams: ManualMode.ManualParams = ManualParams())

Types

Link copied to clipboard
data class SimpleManualModeWithSpeedModesParams(val minPower: Double = 0.05, val turnScale: Double = 0.9, val turbo: Double = 1.0, val normal: Double = 0.5, val precise: Double = 0.2, val slow: Double = 0.1)

Configuration object for manual control.

Properties

Link copied to clipboard

used to share information across opmodes

Link copied to clipboard
val gamepad1: Gamepad

used to get information from gamepad one

Link copied to clipboard
val gamepad2: Gamepad

used to get information from gamepad two

Link copied to clipboard
val hardwareMap: HardwareMap

used to get hardware instances

Link copied to clipboard
var rx: Double

the rotation input from the gamepad

Link copied to clipboard
val telemetry: Telemetry

used to log information to the driver station

Link copied to clipboard
var x: Double

the x-axis input from the gamepad

Link copied to clipboard
var y: Double

the y-axis input from the gamepad

Functions

Link copied to clipboard
open override fun begin()

Code to run when the op mode begins.

Link copied to clipboard
fun calculatePoseWithGamepad(): PoseVelocity2d

Calculates the pose velocity of the robot based on the gamepad input.

Link copied to clipboard
open fun end()

Optional code to run when the op mode ends.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun tick()

Tick the manual mode.