mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-28 02:04:07 +08:00
ms4525 treat max temperature as an error
This commit is contained in:
parent
f82e85f8ff
commit
ca480ff868
@ -210,6 +210,13 @@ MEASAirspeed::collect()
|
||||
dp_raw = 0x3FFF & dp_raw;
|
||||
dT_raw = (val[2] << 8) + val[3];
|
||||
dT_raw = (0xFFE0 & dT_raw) >> 5;
|
||||
|
||||
// dT max is almost certainly an invalid reading
|
||||
if (dT_raw == 2047) {
|
||||
perf_count(_comms_errors);
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
float temperature = ((200.0f * dT_raw) / 2047) - 50;
|
||||
|
||||
// Calculate differential pressure. As its centered around 8000
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user