Gyroscope

public final class Gyroscope
extends Object

java.lang.Object
   ↳ androidx.car.app.hardware.info.Gyroscope


Information about car specific gyroscopes available from the car hardware.

Summary

Public constructors

Gyroscope(CarValue<List<Float>> rotations)

Creates an Gyroscope with the given raw data.

Public methods

boolean equals(Object other)
CarValue<List<Float>> getRotations()

Returns the raw gyroscope data from the car sensor.

int hashCode()
String toString()

Inherited methods

Public constructors

Gyroscope

public Gyroscope (CarValue<List<Float>> rotations)

Creates an Gyroscope with the given raw data.

Parameters
rotations CarValue

Throws
NullPointerException if rotations is null

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getRotations

public CarValue<List<Float>> getRotations ()

Returns the raw gyroscope data from the car sensor.

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

  • [0]: X component of rotation, in rad/s
  • [1]: Y component of rotation, in rad/s
  • [2]: Z component of rotation, in rad/s

Returns
CarValue<List<Float>>

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String