Onewire search bug fix

Current version tries copying device address even when no device is
found.
Merged from
c6564f2232
This commit is contained in:
Hazar Karabay 2015-08-30 00:54:22 +03:00
parent 474ae33288
commit f6d0c0c662
1 changed files with 4 additions and 3 deletions

View File

@ -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;
} }