mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
Copter: use new baro API
This commit is contained in:
parent
fc119d9b80
commit
35e3c887d2
@ -445,9 +445,9 @@ static void NOINLINE send_raw_imu2(mavlink_channel_t chan)
|
||||
mavlink_msg_scaled_pressure_send(
|
||||
chan,
|
||||
millis(),
|
||||
(float)barometer.get_pressure()/100.0f,
|
||||
(float)(barometer.get_pressure() - barometer.get_ground_pressure())/100.0f,
|
||||
(int)(barometer.get_temperature()*10));
|
||||
barometer.get_pressure()*0.01f, // hectopascal
|
||||
(barometer.get_pressure() - barometer.get_ground_pressure())*0.01f, // hectopascal
|
||||
(int16_t)(barometer.get_temperature()*100)); // 0.01 degrees C
|
||||
}
|
||||
|
||||
static void NOINLINE send_raw_imu3(mavlink_channel_t chan)
|
||||
@ -461,8 +461,8 @@ static void NOINLINE send_raw_imu3(mavlink_channel_t chan)
|
||||
mag_offsets.y,
|
||||
mag_offsets.z,
|
||||
compass.get_declination(),
|
||||
barometer.get_raw_pressure(),
|
||||
barometer.get_raw_temp(),
|
||||
barometer.get_pressure(),
|
||||
barometer.get_temperature()*100,
|
||||
gyro_offsets.x,
|
||||
gyro_offsets.y,
|
||||
gyro_offsets.z,
|
||||
|
@ -96,7 +96,8 @@ test_baro(uint8_t argc, const Menu::arg *argv)
|
||||
} else {
|
||||
cliSerial->printf_P(PSTR("Alt: %0.2fm, Raw: %f Temperature: %.1f\n"),
|
||||
alt / 100.0,
|
||||
barometer.get_pressure(), 0.1*barometer.get_temperature());
|
||||
barometer.get_pressure(),
|
||||
barometer.get_temperature());
|
||||
}
|
||||
if(cliSerial->available() > 0) {
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user