OSDN Git Service

fix [4056232] Deprecate Sensor.TYPE_TEMPERATURE and add Sensor.TYPE_AMBIENT_TEMPERATURE
authorMathias Agopian <mathias@google.com>
Wed, 23 Mar 2011 01:42:03 +0000 (18:42 -0700)
committerMathias Agopian <mathias@google.com>
Wed, 23 Mar 2011 01:44:02 +0000 (18:44 -0700)
Bug: 4056232
Change-Id: I4555823abacc8aa127429bda78033ef6007aa04b

include/hardware/sensors.h

index 04768a0..0086c42 100644 (file)
@@ -56,11 +56,12 @@ __BEGIN_DECLS
 #define SENSOR_TYPE_GYROSCOPE           4
 #define SENSOR_TYPE_LIGHT               5
 #define SENSOR_TYPE_PRESSURE            6
-#define SENSOR_TYPE_TEMPERATURE         7
+#define SENSOR_TYPE_TEMPERATURE         7   // deprecated
 #define SENSOR_TYPE_PROXIMITY           8
 #define SENSOR_TYPE_GRAVITY             9
 #define SENSOR_TYPE_LINEAR_ACCELERATION 10
 #define SENSOR_TYPE_ROTATION_VECTOR     11
+#define SENSOR_TYPE_AMBIENT_TEMPERATURE 13
 
 /**
  * Values returned by the accelerometer in various locations in the universe.
@@ -274,6 +275,14 @@ __BEGIN_DECLS
  *   sensors_event_t.data[2] = z*sin(theta/2)
  *   sensors_event_t.data[3] =   cos(theta/2)
  *
+ * Ambient Temperature
+ * -------------------
+ *
+ * The ambient (room) temperature in degree Celsius.
+ *
+ * Temperature sensors report a value only when it changes and each time the
+ * sensor is enabled. setDelay() is ignored.
+ *
  */
 
 typedef struct {