multi diff pres sensor publication and logging

This commit is contained in:
Daniel Agar
2017-08-19 22:49:29 +02:00
committed by Lorenz Meier
parent 8db2883d84
commit b2a81ed35b
9 changed files with 45 additions and 14 deletions
+2 -1
View File
@@ -116,7 +116,7 @@ extern "C" __EXPORT int ets_airspeed_main(int argc, char *argv[]);
ETSAirspeed::ETSAirspeed(int bus, int address, const char *path) : Airspeed(bus, address,
CONVERSION_INTERVAL, path)
{
_device_id.devid_s.devtype = DRV_DIFF_PRESS_DEVTYPE_MS4525;
}
int
@@ -177,6 +177,7 @@ ETSAirspeed::collect()
report.differential_pressure_filtered_pa = diff_pres_pa_raw;
report.differential_pressure_raw_pa = diff_pres_pa_raw;
report.temperature = -1000.0f;
report.device_id = _device_id.devid;
if (_airspeed_pub != nullptr && !(_pub_blocked)) {
/* publish it */