mirror of
https://github.com/niesteszeck/idDHT11.git
synced 2025-03-15 04:27:29 +03:00
mod to the response timing
This commit is contained in:
parent
ac5c661b2d
commit
c13b5732b8
@ -68,9 +68,10 @@ void idDHT11::isrCallback() {
|
||||
}
|
||||
switch(state) {
|
||||
case RESPONSE:
|
||||
if(delta<25)
|
||||
return; //do nothing, it started the response signal
|
||||
if(125<delta && delta<170) {
|
||||
if(delta<25){
|
||||
us -= delta;
|
||||
break; //do nothing, it started the response signal
|
||||
} if(125<delta && delta<190) {
|
||||
state = DATA;
|
||||
} else {
|
||||
detachInterrupt(intNumber);
|
||||
@ -83,7 +84,6 @@ void idDHT11::isrCallback() {
|
||||
detachInterrupt(intNumber);
|
||||
status = IDDHTLIB_ERROR_DELTA;
|
||||
state = STOPPED;
|
||||
// return;
|
||||
} else if(60<delta && delta<135) { //valid in timing
|
||||
if(delta>90) //is a one
|
||||
bits[idx] |= (1 << cnt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user