Onewire search bug fix
Current version tries copying device address even when no device is
found.
Merged from
c6564f2232
This commit is contained in:
parent
474ae33288
commit
f6d0c0c662
|
@ -403,9 +403,10 @@ uint8_t onewire_search(uint8_t pin, uint8_t *newAddr)
|
||||||
LastDeviceFlag[pin] = FALSE;
|
LastDeviceFlag[pin] = FALSE;
|
||||||
LastFamilyDiscrepancy[pin] = 0;
|
LastFamilyDiscrepancy[pin] = 0;
|
||||||
search_result = FALSE;
|
search_result = FALSE;
|
||||||
}
|
} else {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 8; i++) newAddr[i] = ROM_NO[pin][i];
|
for (i = 0; i < 8; i++) newAddr[i] = ROM_NO[pin][i];
|
||||||
|
}
|
||||||
return search_result;
|
return search_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue