|
@@ -88,7 +88,7 @@ static int dht11_decode(struct dht11 *dht11, int offset)
|
|
|
unsigned char temp_int, temp_dec, hum_int, hum_dec, checksum;
|
|
|
|
|
|
/* Calculate timestamp resolution */
|
|
|
- for (i = 0; i < dht11->num_edges; ++i) {
|
|
|
+ for (i = 1; i < dht11->num_edges; ++i) {
|
|
|
t = dht11->edges[i].ts - dht11->edges[i-1].ts;
|
|
|
if (t > 0 && t < timeres)
|
|
|
timeres = t;
|