diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2013-11-01 13:58:23 +0400 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2013-11-01 13:58:23 +0400 |
commit | 97acb49028da526ad9081e9eecea97ec0a822858 (patch) | |
tree | cf39adc534b6b8899325d77bcc7a0ef5b99df35b /src | |
parent | 9eea4f79d9588153b751b7ba6053840c94b89194 (diff) | |
download | px4-firmware-97acb49028da526ad9081e9eecea97ec0a822858.tar.gz px4-firmware-97acb49028da526ad9081e9eecea97ec0a822858.tar.bz2 px4-firmware-97acb49028da526ad9081e9eecea97ec0a822858.zip |
commander: bug fixed in failsafe
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/commander/commander.cpp | 4 |
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 { |