Remote control

State

Control mode

Declaration

getControlMode()

Example

val state:RemoteControl.State
assertTrue(state.controlMode.value == RemoteControl.ControlMode.STARTED)
// Remote control is started

Angle

Declaration

getAngle()

Discussion

Wheel base angle

Example

val state:RemoteControl.State
assertTrue(state.angle.value?.value == 50.0)
assertTrue(state.angle.value?.unit == Angle.Unit.DEGREES)
// Angle is 50.0°

Speed

Declaration

getSpeed()

Discussion

Target speed

Example

val state:RemoteControl.State
assertTrue(state.speed.value?.value == 5.0)
assertTrue(state.speed.value?.unit == Speed.Unit.KILOMETERS_PER_HOUR)
// Speed is 5.0km/h

Setters

Control command

Declaration

public ControlCommand(@Nullable Angle angle, @Nullable Speed speed)

Example

val controlCommand = RemoteControl.ControlCommand(Angle(50.0, Angle.Unit.DEGREES), Speed(5.0, Speed.Unit.KILOMETERS_PER_HOUR))    

Start control

Declaration

public StartControl()

Example

val startControl = RemoteControl.StartControl()    

Stop control

Declaration

public StopControl()

Example

val stopControl = RemoteControl.StopControl()    

Getters

Get Remote Control property availability information

Declaration

public GetControlStateAvailability()

Example

// get all property availabilities
val getAvailability = GetControlStateAvailability()

Get control state

Declaration

public GetControlState()

Example

// get all properties
val getState = GetControlState()