c
Diff: DS1820.cpp
- Revision:
- 4:29264b0a2c9f
- Parent:
- 3:8f2b7f4940b5
- Child:
- 5:2cd4928e8147
diff -r 8f2b7f4940b5 -r 29264b0a2c9f DS1820.cpp --- a/DS1820.cpp Thu Aug 01 10:18:17 2013 +0000 +++ b/DS1820.cpp Wed Aug 07 11:02:10 2013 +0000 @@ -151,7 +151,10 @@ if (ROM_bit_index != 0xFF) { for(byte_counter=0;byte_counter<8;byte_counter++) ROM[byte_counter] = DS1820_search_ROM[byte_counter]; - return_value = true; + if (ROM_checksum_error()) // Check the CRC + DS1820_last_descrepancy = 0; // Abort any more search + else + return_value = true; } } if (DS1820_last_descrepancy == 0)