I have an incomprehensible error in the ESP8266. When in the code, I have an if condition
.
ESP on the serial monitor displays
.
after which it resets itself. When I change the code to
.
the program runs correctly. It doesn't matter if in if I have != or == it is always wrong.
I have investigated that the problem occurs when the variable crcCalculate appears in the if. If I put another variable there it is ok. crcCalculate is
.
The problem is related to the function crc16.Modbus( sbuf, 0, len - 2 ). When I assign a constant or other variable to crcCalculate the program does not crash but crc16.Modbus also occurs in another part of the code.
Code: C / C++
ESP on the serial monitor displays

after which it resets itself. When I change the code to
Code: C / C++
the program runs correctly. It doesn't matter if in if I have != or == it is always wrong.
I have investigated that the problem occurs when the variable crcCalculate appears in the if. If I put another variable there it is ok. crcCalculate is
Code: C / C++
The problem is related to the function crc16.Modbus( sbuf, 0, len - 2 ). When I assign a constant or other variable to crcCalculate the program does not crash but crc16.Modbus also occurs in another part of the code.