Copter: use baro healthy()

This commit is contained in:
Randy Mackay 2014-08-13 22:54:41 +09:00
parent 53b073148b
commit 7686660c73
4 changed files with 5 additions and 5 deletions

View File

@ -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()) {

View File

@ -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"));
}

View File

@ -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);

View File

@ -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"),