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

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

fun hashCode(): Int

toString

fun toString(): String