PressureWrapper: get_Pressure: fix to condition of crc check

This commit is contained in:
Evgenii Meshcheriakov 2022-10-18 14:02:11 +03:00
parent cf21bacbf2
commit 56e63e3e20

View File

@ -43,7 +43,7 @@ int PressureWrapper::getPressure() {
getRawPressure (); getRawPressure ();
i = 0; i = 0;
} }
if(crc8(data.rBuffer, 2) != data.crc){ if(crc8(data.rBuffer, 2) == data.crc){
pressure = data.rBuffer[0]; pressure = data.rBuffer[0];
pressure = pressure << 8; pressure = pressure << 8;
pressure |= data.rBuffer[1]; pressure |= data.rBuffer[1];