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;
LastFamilyDiscrepancy[pin] = 0;
search_result = FALSE;
}
int i;
for (i = 0; i < 8; i++) newAddr[i] = ROM_NO[pin][i];
} else {
int i;
for (i = 0; i < 8; i++) newAddr[i] = ROM_NO[pin][i];
}
return search_result;
}