Speed
@CarProtocol
@RequiresCarApi(value = 3)
class Speed
Information about the current car speed.
Summary
Nested types |
|---|
class Speed.BuilderA builder of |
Public functions |
|
|---|---|
Boolean |
|
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 |
hashCode() |
String |
toString() |
Public functions
getDisplaySpeedMetersPerSecond
fun getDisplaySpeedMetersPerSecond(): CarValue<Float!>
Returns the display speed of the car in meters/second.
Some cars display a slightly slower speed than the actual speed. This is usually displayed on the speedometer.
The value is positive when the vehicle is moving forward, negative when moving backwards and zero when stopped.
getRawSpeedMetersPerSecond
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
fun getSpeedDisplayUnit(): CarValue<Int!>
Returns the units used to display speed from the car settings.
See CarUnit for valid speed units.