mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 12:43:34 +08:00
multi diff pres sensor publication and logging
This commit is contained in:
committed by
Lorenz Meier
parent
8db2883d84
commit
b2a81ed35b
@@ -139,6 +139,7 @@ MEASAirspeed::MEASAirspeed(int bus, int address, const char *path) : Airspeed(bu
|
||||
_t_system_power(-1),
|
||||
system_power{}
|
||||
{
|
||||
_device_id.devid_s.devtype = DRV_DIFF_PRESS_DEVTYPE_MS4525;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -247,6 +248,7 @@ MEASAirspeed::collect()
|
||||
report.temperature = temperature;
|
||||
report.differential_pressure_filtered_pa = _filter.apply(diff_press_pa_raw) - _diff_pres_offset;
|
||||
report.differential_pressure_raw_pa = diff_press_pa_raw - _diff_pres_offset;
|
||||
report.device_id = _device_id.devid;
|
||||
|
||||
if (_airspeed_pub != nullptr && !(_pub_blocked)) {
|
||||
/* publish it */
|
||||
|
||||
Reference in New Issue
Block a user