aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-09-07 15:29:53 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-09-22 10:53:44 +0200
commit21009e89a4c748d8a61174058bb378c1d6306b8d (patch)
tree6c9ad5b119e3f8d24ede776f3c75c25702a5c94d
parentd18f3ee70d5fbeb150c6b37ccafa4f622494ec19 (diff)
downloadpx4-firmware-21009e89a4c748d8a61174058bb378c1d6306b8d.tar.gz
px4-firmware-21009e89a4c748d8a61174058bb378c1d6306b8d.tar.bz2
px4-firmware-21009e89a4c748d8a61174058bb378c1d6306b8d.zip
flight termination mavlink outtput: limit rate
-rw-r--r--src/modules/commander/commander.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp
index b7a16e4e6..134f23c0b 100644
--- a/src/modules/commander/commander.cpp
+++ b/src/modules/commander/commander.cpp
@@ -1688,9 +1688,12 @@ int commander_thread_main(int argc, char *argv[])
static bool flight_termination_printed = false;
if (!flight_termination_printed) {
warnx("Flight termination because of data link loss && gps failure");
+ mavlink_log_critical(mavlink_fd, "DL and GPS lost: flight termination");
flight_termination_printed = true;
}
- mavlink_log_critical(mavlink_fd, "DL and GPS lost: flight termination");
+ if (counter % (1000000 / COMMANDER_MONITORING_INTERVAL) == 0 ) {
+ mavlink_log_critical(mavlink_fd, "DL and GPS lost: flight termination");
+ }
}
/* At this point the rc signal and the gps system have been checked
@@ -1709,7 +1712,9 @@ int commander_thread_main(int argc, char *argv[])
warnx("Flight termination because of RC signal loss && gps failure");
flight_termination_printed = true;
}
- mavlink_log_critical(mavlink_fd, "RC and GPS lost: flight termination");
+ if (counter % (1000000 / COMMANDER_MONITORING_INTERVAL) == 0 ) {
+ mavlink_log_critical(mavlink_fd, "RC and GPS lost: flight termination");
+ }
}
}