DrivetrainManualMode

abstract class DrivetrainManualMode<T : Drivetrain, R : DrivetrainRobot<T>>(params: DrivetrainManualMode.DrivetrainControlsParams = DrivetrainControlsParams(), manualParams: ManualMode.ManualParams = ManualParams()) : ManualMode<R>

A ManualMode that defines events for controlling a DrivetrainRobot.

Parameters

T

the type of drivetrain to control

R

the type of robot with drivetrain

params

the configuration object for manual control

manualParams

the configuration object for manual control

Inheritors

Constructors

Link copied to clipboard
constructor(params: DrivetrainManualMode.DrivetrainControlsParams = DrivetrainControlsParams(), manualParams: ManualMode.ManualParams = ManualParams())

Types

Link copied to clipboard
data class DrivetrainControlsParams(val minPower: Double = 0.05, val turnScale: Double = 0.9, val speedScale: Double = 0.4)

Configuration object for drivetrain 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 fun begin()

Code to run when the op mode begins.

Link copied to clipboard
fun calculatePoseWithGamepad(scale: Double): 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.