Browse Source

commander preflight delete individual sensor selftest

sbg
Daniel Agar 7 years ago committed by Lorenz Meier
parent
commit
daee7a4e4e
  1. 33
      src/modules/commander/PreflightCheck.cpp

33
src/modules/commander/PreflightCheck.cpp

@ -142,17 +142,6 @@ static bool magnometerCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &sta @@ -142,17 +142,6 @@ static bool magnometerCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &sta
goto out;
}
ret = h.ioctl(MAGIOCSELFTEST, 0);
if (ret != OK) {
if (report_fail) {
mavlink_log_critical(mavlink_log_pub, "PREFLIGHT FAIL: MAG #%u SELFTEST FAILED", instance);
}
success = false;
goto out;
}
out:
if (instance==0) set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_MAG, present, !optional, success, status);
if (instance==1) set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_MAG2, present, !optional, success, status);
@ -281,17 +270,6 @@ static bool accelerometerCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s & @@ -281,17 +270,6 @@ static bool accelerometerCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &
goto out;
}
ret = h.ioctl(ACCELIOCSELFTEST, 0);
if (ret != OK) {
if (report_fail) {
mavlink_log_critical(mavlink_log_pub, "PREFLIGHT FAIL: ACCEL #%u TEST FAILED: %d", instance, ret);
}
success = false;
goto out;
}
#ifdef __PX4_NUTTX
if (dynamic) {
@ -367,17 +345,6 @@ static bool gyroCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &status, u @@ -367,17 +345,6 @@ static bool gyroCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &status, u
goto out;
}
ret = h.ioctl(GYROIOCSELFTEST, 0);
if (ret != OK) {
if (report_fail) {
mavlink_log_critical(mavlink_log_pub, "PREFLIGHT FAIL: GYRO #%u SELFTEST FAILED", instance);
}
success = false;
goto out;
}
out:
if (instance==0) set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_GYRO, present, !optional, success, status);
if (instance==1) set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_GYRO2, present, !optional, success, status);

Loading…
Cancel
Save