mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 07:53:43 +08:00
Fix 3 lsb in BMP085 pressure result, add raw values to the message.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user