Merge pull request #622 from hazarkarabay/master

Onewire search bug fix
This commit is contained in:
Vowstar 2015-08-31 01:47:50 +08:00
commit c7c09d12ec
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;
} else {
int i;
for (i = 0; i < 8; i++) newAddr[i] = ROM_NO[pin][i];
}
int i;
for (i = 0; i < 8; i++) newAddr[i] = ROM_NO[pin][i];
return search_result;
}