aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/commander.cpp
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2013-11-01 13:58:23 +0400
committerAnton Babushkin <anton.babushkin@me.com>2013-11-01 13:58:23 +0400
commit97acb49028da526ad9081e9eecea97ec0a822858 (patch)
treecf39adc534b6b8899325d77bcc7a0ef5b99df35b /src/modules/commander/commander.cpp
parent9eea4f79d9588153b751b7ba6053840c94b89194 (diff)
downloadpx4-firmware-97acb49028da526ad9081e9eecea97ec0a822858.tar.gz
px4-firmware-97acb49028da526ad9081e9eecea97ec0a822858.tar.bz2
px4-firmware-97acb49028da526ad9081e9eecea97ec0a822858.zip
commander: bug fixed in failsafe
Diffstat (limited to 'src/modules/commander/commander.cpp')
-rw-r--r--src/modules/commander/commander.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp
index ed090271c..cbf900fce 100644
--- a/src/modules/commander/commander.cpp
+++ b/src/modules/commander/commander.cpp
@@ -1600,8 +1600,8 @@ check_navigation_state_machine(struct vehicle_status_s *status, struct vehicle_c
/* switch to failsafe mode */
bool manual_control_old = control_mode->flag_control_manual_enabled;
- if (!status->condition_landed) {
- /* in air: try to hold position */
+ if (!status->condition_landed && status->condition_local_position_valid) {
+ /* in air: try to hold position if possible */
res = navigation_state_transition(status, NAVIGATION_STATE_VECTOR, control_mode);
} else {