Skip to content

Commit

Permalink
Update firmware.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
daviinacio committed Apr 1, 2019
1 parent 339d9cb commit 7814e36
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions firmware/firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,11 @@ void thr_dht_func(){
if(dht.getStatus() != DHT::ERROR_NONE) return;

// Avoid first read problems
dht_temp_buffer.insert(dht_temp_read);
dht_hum_buffer.insert(dht_hum_read);
if(dht_temp_buffer.empty()) dht_temp_buffer.fill((int) dht_temp_read);
else dht_temp_buffer.insert((int) dht_temp_read);

if(dht_hum_buffer.empty()) dht_hum_buffer.fill((int) dht_hum_read);
else dht_hum_buffer.insert((int) dht_hum_read);
}

void thr_ir_func(){
Expand Down

0 comments on commit 7814e36

Please sign in to comment.