drivers: Populate baro device ID

TODO - use unique HW ID
This commit is contained in:
Paul Riseborough
2017-01-09 13:24:41 +01:00
committed by Lorenz Meier
parent 137bd73ea1
commit 5e53a5425a
3 changed files with 8 additions and 0 deletions
+2
View File
@@ -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 */
+3
View File
@@ -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) {
+3
View File
@@ -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 */
/*