Speed
@CarProtocol
@RequiresCarApi(value = 3)
public final class Speed
Information about the current car speed.
Summary
Nested types |
|---|
public final class Speed.BuilderA builder of |
Public methods |
|
|---|---|
boolean |
|
@NonNull CarValue<Float> |
Returns the display speed of the car in meters/second. |
@NonNull CarValue<Float> |
Returns the raw speed of the car in meters/second. |
@NonNull CarValue<Integer> |
Returns the units used to display speed from the car settings. |
int |
hashCode() |
@NonNull String |
toString() |
Public methods
getDisplaySpeedMetersPerSecond
public @NonNull CarValue<Float> getDisplaySpeedMetersPerSecond()
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
public @NonNull CarValue<Float> getRawSpeedMetersPerSecond()
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.