ModernDriveControls class
Modern drive controls, similar to most racing video games.
Triggers are for acceleration, left stick for steering. Also includes camera controls on the D-pad and right stick.
- Inheritance
-
- Object
- RoverControls
- ModernDriveControls
Constructors
Properties
-
A human-readable explanation of what the controls are.
no setteroverride
- frontSwivel ↔ double
-
The angle of the front swivel servo.
getter/setter pair
- frontTilt ↔ double
-
The angle of the front tilt servo.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- leftShoulderFlag ↔ bool
-
Whether the left shoulder was pressed last tick.
getter/setter pair
- mode → OperatingMode
-
The OperatingMode for these controls.
no setteroverride
-
onDispose
→ List<
Message> -
A list of commands that disables the subsystem.
no setteroverride
- rearSwivel ↔ double
-
The angle of the rear swivel servo.
getter/setter pair
- rearTilt ↔ double
-
The angle of the rear tilt servo.
getter/setter pair
- rightShoulderFlag ↔ bool
-
Whether the right shoulder was pressed last tick.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- throttle ↔ double
-
The throttle value.
getter/setter pair
Methods
-
getCameraCommands(
GamepadState state) → List< DriveCommand> - Gets all camera commands based on the gamepad state.
-
getWheelCommands(
GamepadState state) → List< DriveCommand> - Gets all commands for the wheels based on the gamepad state.
-
getWheelSpeeds(
double speed, double direction) → (double, double) - Gets the speeds of the wheels based on the speed and direction.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseInputs(
GamepadState state) → List< Message> -
Return a list of commands based on the current state of the gamepad.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateCameras(
GamepadState state) → void - Updates variables for both cameras' servos.
-
updateState(
GamepadState state) → void -
Any logic to run before checking parseInputs.
override
-
updateThrottle(
GamepadState state) → void - Updates the throttle if either shoulder button is pressed.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- cameraSwivelIncrement → const int
- How far to swivel the cameras each tick.
- cameraTiltIncrement → const double
- How far to tilt the cameras each tick.