Commander: Only report GPS lost errors if armed

This commit is contained in:
Lorenz Meier
2017-06-10 14:49:03 +02:00
parent a25330762a
commit a1a0dd37dc
+3 -1
View File
@@ -2457,7 +2457,9 @@ int commander_thread_main(int argc, char *argv[])
} else if (!status_flags.gps_failure) {
status_flags.gps_failure = true;
status_changed = true;
mavlink_log_critical(&mavlink_log_pub, "GPS fix lost");
if (status.arming_state == vehicle_status_s::ARMING_STATE_ARMED) {
mavlink_log_critical(&mavlink_log_pub, "GPS fix lost");
}
}
}