aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-07-20 18:23:41 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-07-20 18:23:41 +0200
commit86b9e367a6cc5791f83df3223190a470798c00ff (patch)
tree8017587e953ad862603e5a205efa00da233983ec
parentdcf114aa65273d5d5ce522565fc364fc347ba3fe (diff)
downloadpx4-firmware-86b9e367a6cc5791f83df3223190a470798c00ff.tar.gz
px4-firmware-86b9e367a6cc5791f83df3223190a470798c00ff.tar.bz2
px4-firmware-86b9e367a6cc5791f83df3223190a470798c00ff.zip
introduce data link lost counter
-rw-r--r--src/modules/commander/commander.cpp1
-rw-r--r--src/modules/uORB/topics/vehicle_status.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp
index 8eba64c1d..46065fef1 100644
--- a/src/modules/commander/commander.cpp
+++ b/src/modules/commander/commander.cpp
@@ -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;
}
}
diff --git a/src/modules/uORB/topics/vehicle_status.h b/src/modules/uORB/topics/vehicle_status.h
index b46c00b75..eda1dfaec 100644
--- a/src/modules/uORB/topics/vehicle_status.h
+++ b/src/modules/uORB/topics/vehicle_status.h
@@ -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;