Accelerometer

@CarProtocol
@RequiresCarApi(value = 3)
class Accelerometer


Information about car specific accelerometers available from the car hardware.

Summary

Public constructors

Creates an Accelerometer with the given raw data.

Public functions

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

Returns the raw accelerometer force data from the car sensor.

Int
String

Public constructors

Accelerometer

Added in 1.1.0
Accelerometer(forces: CarValue<(Mutable)List<Float!>!>)

Creates an Accelerometer with the given raw data.

Throws
java.lang.NullPointerException

if forces is null

Public functions

equals

Added in 1.4.0-rc02
fun equals(other: Any?): Boolean

getForces

Added in 1.1.0
fun getForces(): CarValue<(Mutable)List<Float!>!>

Returns the raw accelerometer force data from the car sensor.

Individual values can be Float.Nan if not reported. The array values consist of:

  • [0]: Acceleration including gravity on the x-axis
  • [1]: Acceleration including gravity on the y-axis
  • [2]: Acceleration including gravity on the z-axis

hashCode

Added in 1.4.0-rc02
fun hashCode(): Int

toString

Added in 1.4.0-rc02
fun toString(): String