mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-29 03:36:07 +08:00
posix drivers: Populate baro device ID
TODO - use unique HW ID
This commit is contained in:
committed by
Lorenz Meier
parent
0ba31b521c
commit
c21b4aaf2e
@@ -680,6 +680,9 @@ BAROSIM::collect()
|
|||||||
report.altitude = raw_baro.altitude;
|
report.altitude = raw_baro.altitude;
|
||||||
report.temperature = raw_baro.temperature;
|
report.temperature = raw_baro.temperature;
|
||||||
|
|
||||||
|
/* TODO get device ID for sensor */
|
||||||
|
report.device_id = 0;
|
||||||
|
|
||||||
/* publish it */
|
/* publish it */
|
||||||
if (!(m_pub_blocked)) {
|
if (!(m_pub_blocked)) {
|
||||||
if (_baro_topic != nullptr) {
|
if (_baro_topic != nullptr) {
|
||||||
|
|||||||
@@ -155,9 +155,11 @@ int DfBmp280Wrapper::_publish(struct baro_sensor_data &data)
|
|||||||
|
|
||||||
baro_report.pressure = data.pressure_pa;
|
baro_report.pressure = data.pressure_pa;
|
||||||
baro_report.temperature = data.temperature_c;
|
baro_report.temperature = data.temperature_c;
|
||||||
|
|
||||||
// TODO: verify this, it's just copied from the MS5611 driver.
|
// TODO: verify this, it's just copied from the MS5611 driver.
|
||||||
|
|
||||||
|
/* TODO get device ID for sensor */
|
||||||
|
baro_report.device_id = 0;
|
||||||
|
|
||||||
// Constant for now
|
// Constant for now
|
||||||
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
||||||
|
|
||||||
|
|||||||
@@ -156,6 +156,9 @@ int DfMS5607Wrapper::_publish(struct baro_sensor_data &data)
|
|||||||
|
|
||||||
// TODO: verify this, it's just copied from the MS5611 driver.
|
// TODO: verify this, it's just copied from the MS5611 driver.
|
||||||
|
|
||||||
|
/* TODO get device ID for sensor */
|
||||||
|
baro_report.device_id = 0;
|
||||||
|
|
||||||
// Constant for now
|
// Constant for now
|
||||||
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
||||||
|
|
||||||
|
|||||||
@@ -156,6 +156,9 @@ int DfMS5611Wrapper::_publish(struct baro_sensor_data &data)
|
|||||||
|
|
||||||
// TODO: verify this, it's just copied from the MS5611 driver.
|
// TODO: verify this, it's just copied from the MS5611 driver.
|
||||||
|
|
||||||
|
/* TODO get device ID for sensor */
|
||||||
|
baro_report.device_id = 0;
|
||||||
|
|
||||||
// Constant for now
|
// Constant for now
|
||||||
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
const double MSL_PRESSURE_KPA = 101325.0 / 1000.0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user