Browse Source

fix zero crc value

Juraj Ďuďák 2 years ago
parent
commit
104895354b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/dataframe.cpp

+ 4 - 0
src/dataframe.cpp

@@ -95,6 +95,10 @@ uint8_t crc8(uint8_t crc, uint8_t Size, uint8_t *Buffer)
         crc = CrcTable[crc & 0xFF]; // One round of 8-bits
     }
 
+    if (crc == 0){
+    	crc = 1;
+    }
+
     return(crc);
 }