]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
sht11: correct measurement timeout values
authorR. Steve McKown <rsmckown@gmail.com>
Sat, 27 Oct 2012 03:28:55 +0000 (21:28 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Sat, 27 Oct 2012 03:28:55 +0000 (21:28 -0600)
tos/chips/sht11/SensirionSht11LogicP.nc

index f3f02697b0737b2d783a9422d8f1ca767849ee13..84a903cfaaa7375a5ce1e9db97490f8e00d7c2ff 100644 (file)
@@ -74,9 +74,14 @@ implementation {
 
   enum {
     TIMEOUT_RESET = 11,
-    TIMEOUT_14BIT = 250,
-    TIMEOUT_12BIT = 250, //70,
-    TIMEOUT_8BIT = 250, //15,
+
+    /* SHT1x_SHT7x_E data sheet v3.01 indicates readings take at most
+     * 320 ms for 14 bits, 80 ms for 12 bits and 20 ms for 8 bits.
+     * Add 20% as a safety margin.
+     */
+    TIMEOUT_14BIT = 393,
+    TIMEOUT_12BIT = 98,
+    TIMEOUT_8BIT = 25,
   } sht_timeout_t;
 
   bool on = TRUE;