Merge pull request #32 from vas-dav/pressure-wrapper

PressureWrapper: get_Pressure: fix to condition of crc check
This commit is contained in:
Evgenii Meshcheriakov 2022-10-18 14:06:34 +03:00 committed by GitHub
commit 67bc1589dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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