remove compiler warnings of new compilerversion /
[owTools.git] / src / owInterface.cpp
old mode 100755 (executable)
new mode 100644 (file)
index b02c047..3da8460
@@ -38,6 +38,7 @@
 #include <math.h>\r
 #include "hexfile.h"\r
 \r
+uint8_t owCC_44_Temp=0;\r
 \r
 #ifdef WIN\r
 void usleep(__int64 usec)\r
@@ -118,6 +119,16 @@ uint16_t owInterface::calcCRC16(std::vector<uint8_t> data) {
 int owInterface::testCRC16(std::vector<uint8_t> data)  {\r
        return calcCRC16(data)==0xB001;\r
 }\r
+\r
+int owInterface::testCRC16(std::vector<uint8_t> data,uint16_t load) {\r
+       crc16=load;\r
+       for(uint8_t v:data) {\r
+               docrc16(v);\r
+       }\r
+       return crc16==0xB001;\r
+\r
+}\r
+\r
                \r
 void owInterface::resetFlasher(uint64_t id) { // go back from Bootloader\r
        std::vector<uint8_t> data;\r
@@ -476,7 +487,7 @@ int owInterface::owSearch() {
                }\r
                while(rom_byte_number < 8);  // loop until through all ROM bytes 0-7\r
                // if the search was successful then\r
-               if (!((id_bit_number < 65) || (crc8 != 0))) {\r
+               if (!((id_bit_number < 65) || (crc8 != 0)))              {\r
                        // search successful so set LastDiscrepancy,LastDeviceFlag,search_result\r
                        LastDiscrepancy = last_zero;\r
                        // check for last device\r