diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-08-24 22:18:01 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-08-24 22:18:01 +0200 |
commit | 98e74ed0e74e02f866fc7538c7d4153ae3c36743 (patch) | |
tree | 284ddb4e80896fa1eba8e7780a6249c3d732ef23 /src/modules/commander | |
parent | 06317046f2da215db328be660f900d265cdf9102 (diff) | |
download | px4-firmware-98e74ed0e74e02f866fc7538c7d4153ae3c36743.tar.gz px4-firmware-98e74ed0e74e02f866fc7538c7d4153ae3c36743.tar.bz2 px4-firmware-98e74ed0e74e02f866fc7538c7d4153ae3c36743.zip |
commander: limit the output of a warnx
Diffstat (limited to 'src/modules/commander')
-rw-r--r-- | src/modules/commander/commander.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index f05f970e5..2fcf7bebb 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1427,7 +1427,11 @@ int commander_thread_main(int argc, char *argv[]) /* this will only trigger if geofence is activated via param and a geofence file is present, also there is a circuit breaker to disable the actual flight termination in the px4io driver */ armed.force_failsafe = true; status_changed = true; - warnx("Flight termination because of navigator request or geofence"); + static bool flight_termination_printed = false; + if (!flight_termination_printed) { + warnx("Flight termination because of navigator request or geofence"); + flight_termination_printed = true; + } } // no reset is done here on purpose, on geofence violation we want to stay in flighttermination } |