mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
Copter: use relative_alt flag when decoding change_alt command
This commit is contained in:
parent
cf3b487e63
commit
01da4e29fb
@ -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)
|
void GCS_MAVLINK::handle_change_alt_request(AP_Mission::Mission_Command &cmd)
|
||||||
{
|
{
|
||||||
// add home alt if needed
|
// 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;
|
cmd.content.location.alt += ahrs.get_home().alt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user