Copter: use relative_alt flag when decoding change_alt command

This commit is contained in:
Randy Mackay 2014-06-11 14:41:43 +09:00 committed by Andrew Tridgell
parent cf3b487e63
commit 01da4e29fb

View File

@ -906,7 +906,7 @@ void GCS_MAVLINK::handle_guided_request(AP_Mission::Mission_Command &cmd)
void GCS_MAVLINK::handle_change_alt_request(AP_Mission::Mission_Command &cmd)
{
// add home alt if needed
if (cmd.content.location.options & LOCATION_MASK_OPTIONS_RELATIVE_ALT) {
if (cmd.content.location.flags.relative_alt) {
cmd.content.location.alt += ahrs.get_home().alt;
}