Speed


@CarProtocol
@RequiresCarApi(value = 3)
class Speed


Information about the current car speed.

Summary

Nested types

A builder of Speed.

Public functions

Boolean
equals(other: Any?)
CarValue<Float!>

Returns the display speed of the car in meters/second.

CarValue<Float!>

Returns the raw speed of the car in meters/second.

CarValue<Int!>

Returns the units used to display speed from the car settings.

Int
String

Public functions

equals

fun equals(other: Any?): Boolean

getDisplaySpeedMetersPerSecond

Added in 1.1.0
fun getDisplaySpeedMetersPerSecond(): CarValue<Float!>

Returns the display speed of the car in meters/second.

This is the value expected to be displayed on the speedometer.

Some cars may display a slightly higher speed than the actual speed.

The value is positive when the vehicle is moving forward, negative when moving backwards, and zero when stopped.

getRawSpeedMetersPerSecond

Added in 1.1.0
fun getRawSpeedMetersPerSecond(): CarValue<Float!>

Returns the raw speed of the car in meters/second.

The value is positive when the vehicle is moving forward, negative when moving backwards and zero when stopped.

getSpeedDisplayUnit

Added in 1.1.0
fun getSpeedDisplayUnit(): CarValue<Int!>

Returns the units used to display speed from the car settings.

See CarUnit for valid speed units.

hashCode

fun hashCode(): Int

toString

fun toString(): String