Merge pull request #32 from vas-dav/pressure-wrapper
PressureWrapper: get_Pressure: fix to condition of crc check
This commit is contained in:
commit
67bc1589dd
@ -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];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user