mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 15:23:57 -04:00
Copter: use baro healthy()
This commit is contained in:
parent
53b073148b
commit
7686660c73
@ -187,7 +187,7 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan)
|
||||
MAV_SYS_STATUS_SENSOR_3D_MAG |
|
||||
MAV_SYS_STATUS_SENSOR_GPS |
|
||||
MAV_SYS_STATUS_SENSOR_RC_RECEIVER);
|
||||
if (barometer.healthy) {
|
||||
if (barometer.healthy()) {
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE;
|
||||
}
|
||||
if (g.compass_enabled && compass.healthy(0) && ahrs.use_compass()) {
|
||||
|
@ -240,7 +240,7 @@ static void pre_arm_checks(bool display_failure)
|
||||
// check Baro
|
||||
if ((g.arming_check == ARMING_CHECK_ALL) || (g.arming_check & ARMING_CHECK_BARO)) {
|
||||
// barometer health check
|
||||
if(!barometer.healthy) {
|
||||
if(!barometer.healthy()) {
|
||||
if (display_failure) {
|
||||
gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: Baro not healthy"));
|
||||
}
|
||||
|
@ -248,8 +248,8 @@ static void init_ardupilot()
|
||||
#endif // CLI_ENABLED
|
||||
|
||||
#if HIL_MODE != HIL_MODE_DISABLED
|
||||
while (!barometer.healthy) {
|
||||
// the barometer becomes healthy when we get the first
|
||||
while (barometer.get_last_update() == 0) {
|
||||
// the barometer begins updating when we get the first
|
||||
// HIL_STATE message
|
||||
gcs_send_text_P(SEVERITY_LOW, PSTR("Waiting for first HIL_STATE message"));
|
||||
delay(1000);
|
||||
|
@ -60,7 +60,7 @@ test_baro(uint8_t argc, const Menu::arg *argv)
|
||||
delay(100);
|
||||
alt = read_barometer();
|
||||
|
||||
if (!barometer.healthy) {
|
||||
if (!barometer.healthy()) {
|
||||
cliSerial->println_P(PSTR("not healthy"));
|
||||
} else {
|
||||
cliSerial->printf_P(PSTR("Alt: %0.2fm, Raw: %f Temperature: %.1f\n"),
|
||||
|
Loading…
Reference in New Issue
Block a user