diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2013-11-06 23:24:33 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2013-11-06 23:24:33 +0100 |
commit | 8a62e2a4524841f9cfeec8373bd5268ace4f945b (patch) | |
tree | e8d21db885f72d2c108eda827708cd91a28043ea | |
parent | 9526f17f1613e624a23a415d03f474150ed9a273 (diff) | |
parent | c75c5a5f30cde02002d4db16d803dc979ce8d4d5 (diff) | |
download | px4-firmware-8a62e2a4524841f9cfeec8373bd5268ace4f945b.tar.gz px4-firmware-8a62e2a4524841f9cfeec8373bd5268ace4f945b.tar.bz2 px4-firmware-8a62e2a4524841f9cfeec8373bd5268ace4f945b.zip |
Merge remote-tracking branch 'private_julian/fw_autoland_att_tecs' into fw_autoland_att_tecs
-rw-r--r-- | src/modules/commander/commander.cpp | 3 | ||||
-rw-r--r-- | src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp | 2 |
2 files changed, 3 insertions, 2 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; } } diff --git a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp index e01b5813c..602681ce0 100644 --- a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp +++ b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp @@ -720,7 +720,7 @@ FixedwingPositionControl::control_position(const math::Vector2f ¤t_positio _tecs.set_speed_weight(_parameters.speed_weight); /* execute navigation once we have a setpoint */ - if (_setpoint_valid) { + if (_setpoint_valid && _control_mode.flag_control_auto_enabled) { /* current waypoint (the one currently heading for) */ math::Vector2f curr_wp(global_triplet.current.lat / 1e7f, global_triplet.current.lon / 1e7f); |