Offroad

State

Route incline

Declaration

getRouteIncline()

Discussion

The route elevation incline

Example

val state:Offroad.State
assertTrue(state.routeIncline.value?.value == 10.1)
assertTrue(state.routeIncline.value?.unit == Angle.Unit.DEGREES)
// Route incline is 10°

Wheel suspension

Declaration

getWheelSuspension()

Discussion

The wheel suspension level percentage, whereas 0.0 is no suspension and 1.0 maximum suspension

Example

val state:Offroad.State
assertTrue(state.wheelSuspension.value == 0.5)
// Wheel suspension level is 50%

Getters

Get Offroad property availability information

Declaration

public GetStateAvailability()
public GetStateAvailability(byte... propertyIdentifiers)

Example

// get all property availabilities
val getAvailability = GetStateAvailability()
// get routeIncline and wheelSuspension property availabilities
val getAvailabilityProperties = GetStateAvailability(0x01, 0x02)

Get Offroad properties

Declaration

public GetState()
public GetState(byte... propertyIdentifiers)            

Example

// get all properties
val getState = GetState()
// get routeIncline and wheelSuspension properties
val getStateProperties = GetState(0x01, 0x02)