aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-09-07 15:29:53 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-09-07 15:29:53 +0200
commit9608e7adeb069878d5cedd3ece9edc7f4ac40ce4 (patch)
tree3802061f55623170b90444090ffb22578908101a /src/modules
parent3d6fcfcf6b329a49f892f1b85c4d007acb2248e8 (diff)
downloadpx4-firmware-9608e7adeb069878d5cedd3ece9edc7f4ac40ce4.tar.gz
px4-firmware-9608e7adeb069878d5cedd3ece9edc7f4ac40ce4.tar.bz2
px4-firmware-9608e7adeb069878d5cedd3ece9edc7f4ac40ce4.zip
flight termination mavlink outtput: limit rate
Diffstat (limited to 'src/modules')
-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 8dd6fb086..3a8272091 100644
--- a/src/modules/commander/commander.cpp
+++ b/src/modules/commander/commander.cpp
@@ -1684,9 +1684,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
@@ -1705,7 +1708,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");
+ }
}
}