diff options
author | Julian Oes <julian@oes.ch> | 2013-11-06 23:11:14 +0100 |
---|---|---|
committer | Julian Oes <julian@oes.ch> | 2013-11-06 23:11:14 +0100 |
commit | c75c5a5f30cde02002d4db16d803dc979ce8d4d5 (patch) | |
tree | c8bfa05004fd381c2840d1467044c2adbbeb5350 /src/modules/commander | |
parent | 989475144224137967c0998a3bd33d643126e324 (diff) | |
download | px4-firmware-c75c5a5f30cde02002d4db16d803dc979ce8d4d5.tar.gz px4-firmware-c75c5a5f30cde02002d4db16d803dc979ce8d4d5.tar.bz2 px4-firmware-c75c5a5f30cde02002d4db16d803dc979ce8d4d5.zip |
Fixedwing: Enable loiter mode, tested in HIL
Diffstat (limited to 'src/modules/commander')
-rw-r--r-- | src/modules/commander/commander.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index ace13bb78..905d5dee5 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1539,7 +1539,8 @@ check_navigation_state_machine(struct vehicle_status_s *status, struct vehicle_c // TODO AUTO_LAND handling if (status->navigation_state == NAVIGATION_STATE_AUTO_TAKEOFF) { /* don't switch to other states until takeoff not completed */ - if (local_pos->z > -takeoff_alt || status->condition_landed) { + // XXX: only respect the condition_landed when the local position is actually valid + if (status->condition_local_altitude_valid && (local_pos->z > -takeoff_alt || status->condition_landed)) { return TRANSITION_NOT_CHANGED; } } |