mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 10:43:34 +08:00
commander: accel & gyro subsystem health set within IMU check
This commit is contained in:
@@ -99,12 +99,5 @@ bool PreFlightCheck::accelerometerCheck(orb_advert_t *mavlink_log_pub, vehicle_s
|
|||||||
|
|
||||||
const bool success = calibration_valid && valid;
|
const bool success = calibration_valid && valid;
|
||||||
|
|
||||||
if (instance == 0) {
|
|
||||||
set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_ACC, exists, !optional, success, status);
|
|
||||||
|
|
||||||
} else if (instance == 1) {
|
|
||||||
set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_ACC2, exists, !optional, success, status);
|
|
||||||
}
|
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,12 +79,5 @@ bool PreFlightCheck::gyroCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (instance == 0) {
|
|
||||||
set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_GYRO, exists, !optional, calibration_valid && valid, status);
|
|
||||||
|
|
||||||
} else if (instance == 1) {
|
|
||||||
set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_GYRO2, exists, !optional, calibration_valid && valid, status);
|
|
||||||
}
|
|
||||||
|
|
||||||
return calibration_valid && valid;
|
return calibration_valid && valid;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user