X-Git-Url: http://git.smho.de/?a=blobdiff_plain;f=src%2FowInterface.cpp;h=e412f85db34e256fb95a767cd5fcca937ee7a4b2;hb=fcb2710478594b367ec99f1f79651aa107b5af4f;hp=b02c04768626987b4c0dc700a0a52c9aa01974ed;hpb=17ea6dc449cad650a4c783446ab048c12e44c666;p=owTools.git diff --git a/src/owInterface.cpp b/src/owInterface.cpp old mode 100755 new mode 100644 index b02c047..e412f85 --- a/src/owInterface.cpp +++ b/src/owInterface.cpp @@ -38,6 +38,7 @@ #include #include "hexfile.h" +uint8_t owCC_44_Temp=0; #ifdef WIN void usleep(__int64 usec) @@ -118,6 +119,16 @@ uint16_t owInterface::calcCRC16(std::vector data) { int owInterface::testCRC16(std::vector data) { return calcCRC16(data)==0xB001; } + +int owInterface::testCRC16(std::vector data,uint16_t load) { + crc16=load; + for(uint8_t v:data) { + docrc16(v); + } + return crc16==0xB001; + +} + void owInterface::resetFlasher(uint64_t id) { // go back from Bootloader std::vector data; @@ -476,7 +487,7 @@ int owInterface::owSearch() { } while(rom_byte_number < 8); // loop until through all ROM bytes 0-7 // if the search was successful then - if (!((id_bit_number < 65) || (crc8 != 0))) { + if (!((id_bit_number < 65) || (crc8 != 0))) { // search successful so set LastDiscrepancy,LastDeviceFlag,search_result LastDiscrepancy = last_zero; // check for last device @@ -557,6 +568,7 @@ int owInterface::Find() { case 0x26:d=new owDeviceDS2438(this,snum);break; case 0x20:d=new owDeviceDS2450(this,snum);break; case 0x1D:d=new owDeviceDS2423(this,snum);break; + case 0x29:d=new owDeviceDS2408(this,snum);break; default:d=new owDevice(this,snum); } devices.push_back(d);