mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 00:30:35 +08:00
Fix error reporting logic
This commit is contained in:
@@ -2195,9 +2195,9 @@ int commander_thread_main(int argc, char *argv[])
|
||||
/* report a regain */
|
||||
if (telemetry_last_dl_loss[i] > 0) {
|
||||
mavlink_and_console_log_info(mavlink_fd, "data link #%i regained", i);
|
||||
} else if (telemetry_last_dl_loss[i] == 0){
|
||||
/* do not report a new data link in order to not spam the user */
|
||||
status.data_link_found_new = true;
|
||||
} else if (telemetry_last_dl_loss[i] == 0) {
|
||||
/* new link */
|
||||
status.condition_system_prearm_error_reported = false;
|
||||
status_changed = true;
|
||||
}
|
||||
|
||||
@@ -2208,10 +2208,6 @@ int commander_thread_main(int argc, char *argv[])
|
||||
/* telemetry was healthy also in last iteration
|
||||
* we don't have to check a timeout */
|
||||
have_link = true;
|
||||
if(status.data_link_found_new) {
|
||||
status.data_link_found_new = false;
|
||||
status_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user