Accelerometer
@CarProtocol
@RequiresCarApi(value = 3)
class Accelerometer
Information about car specific accelerometers available from the car hardware.
Summary
Public constructors |
|---|
Accelerometer(forces: CarValue<(Mutable)List<Float!>!>)Creates an |
Public functions |
|
|---|---|
Boolean |
|
CarValue<(Mutable)List<Float!>!> |
Returns the raw accelerometer force data from the car sensor. |
Int |
hashCode() |
String |
toString() |
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 |
Public functions
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