mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 04:20:35 +08:00
introduce data link lost counter
This commit is contained in:
@@ -1477,6 +1477,7 @@ int commander_thread_main(int argc, char *argv[])
|
||||
if (!status.data_link_lost) {
|
||||
mavlink_log_critical(mavlink_fd, "ALL DATA LINKS LOST");
|
||||
status.data_link_lost = true;
|
||||
status.data_link_lost_counter++;
|
||||
status_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,6 +201,7 @@ struct vehicle_status_s {
|
||||
bool rc_input_blocked; /**< set if RC input should be ignored */
|
||||
|
||||
bool data_link_lost; /**< datalink to GCS lost */
|
||||
uint8_t data_link_lost_counter; /**< counts unique data link lost events */
|
||||
|
||||
bool offboard_control_signal_found_once;
|
||||
bool offboard_control_signal_lost;
|
||||
|
||||
Reference in New Issue
Block a user