mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 09:13:32 +08:00
drivers: Populate baro device ID
TODO - use unique HW ID
This commit is contained in:
committed by
Lorenz Meier
parent
137bd73ea1
commit
5e53a5425a
@@ -543,6 +543,8 @@ BMP280::collect()
|
||||
report.temperature = _T;
|
||||
report.pressure = _P / 100.0f; // to mbar
|
||||
|
||||
/* TODO get device ID for sensor */
|
||||
report.device_id = 0;
|
||||
|
||||
/* altitude calculations based on http://www.kansasflyer.org/index.asp?nav=Avi&sec=Alti&tab=Theory&pg=1 */
|
||||
|
||||
|
||||
@@ -743,6 +743,9 @@ LPS25H::collect()
|
||||
new_report.pressure = p;
|
||||
new_report.altitude = alt;
|
||||
|
||||
/* TODO get device ID for sensor */
|
||||
new_report.device_id = 0;
|
||||
|
||||
if (!(_pub_blocked)) {
|
||||
|
||||
if (_baro_topic != nullptr) {
|
||||
|
||||
@@ -762,6 +762,9 @@ MS5611::collect()
|
||||
report.temperature = _TEMP / 100.0f;
|
||||
report.pressure = P / 100.0f; /* convert to millibar */
|
||||
|
||||
/* TODO get device ID for sensor */
|
||||
report.device_id = 0;
|
||||
|
||||
/* altitude calculations based on http://www.kansasflyer.org/index.asp?nav=Avi&sec=Alti&tab=Theory&pg=1 */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user