UserSensorReading
public
class
UserSensorReading
extends Object
java.lang.Object | |
↳ | com.google.android.things.userdriver.UserSensorReading |
A single user-sensor reading. Readings consist of an array of floats as well as a sensor status to indicate the confidence level of the given values. The meaning and order of the float array depends on the sensor type, and should match the values provided by SensorEvent.values. Sensor status is not used for all sensor types; those which do not report a status will ignore this value. This class is immutable so that it cannot be modified and reused between multiple readings. This is important because the driver manager may need to store old readings for reference and they must not change.
Summary
Public constructors | |
---|---|
UserSensorReading(float[] values)
Creates a new UserSensorReading with a default SENSOR_STATUS_ACCURACY_HIGH status. |
|
UserSensorReading(float[] values, int status)
Creates a new UserSensorReading. |
Public methods | |
---|---|
boolean
|
equals(Object object)
|
int
|
hashCode()
|
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
UserSensorReading
</div>
UserSensorReading (float[] values)
Creates a new UserSensorReading with a default SENSOR_STATUS_ACCURACY_HIGH status.
The values array is copied here so it may be reused without affecting this object.</p>
Parameters | |
---|---|
values |
float :
Sensor reading values.
|
</div>