Fix 3 lsb in BMP085 pressure result, add raw values to the message.

This commit is contained in:
Martin Mueller
2011-08-05 17:46:30 +02:00
parent 69bcede01b
commit d8b9289422
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -550,6 +550,8 @@
</message>
<message name="BMP_STATUS" id="84">
<field name="UP" type="int32"/>
<field name="UT" type="int32"/>
<field name="press" type="int32" unit="Pa"/>
<field name="temp" type="int32" unit="10x_deg_celsius"/>
</message>
+2 -2
View File
@@ -130,7 +130,7 @@ void baro_bmp_event( void ) {
/* get uncompensated pressure, oss=3 */
bmp_up = (bmp_trans.buf[0] << 11) |
(bmp_trans.buf[1] << 3) |
bmp_trans.buf[2];
(bmp_trans.buf[2] >> 5);
/* start temp measurement */
bmp_trans.buf[0] = BMP085_CTRL_REG;
bmp_trans.buf[1] = BMP085_START_TEMP;
@@ -166,7 +166,7 @@ void baro_bmp_event( void ) {
baro_bmp_temperature = bmp_t;
baro_bmp_pressure = bmp_p;
#ifdef SENSOR_SYNC_SEND
DOWNLINK_SEND_BMP_STATUS(DefaultChannel, &bmp_p, &bmp_t);
DOWNLINK_SEND_BMP_STATUS(DefaultChannel, &bmp_up, &bmp_ut, &bmp_p, &bmp_t);
#endif
}
}