Copter: move handling of get_home_position up
This commit is contained in:
parent
5572d83ce9
commit
edcfa7ffd4
@ -1125,19 +1125,6 @@ void GCS_MAVLINK_Copter::handleMessage(mavlink_message_t* msg)
|
||||
}
|
||||
break;
|
||||
|
||||
case MAV_CMD_GET_HOME_POSITION:
|
||||
if (AP::ahrs().home_is_set()) {
|
||||
send_home(copter.ahrs.get_home());
|
||||
Location ekf_origin;
|
||||
if (copter.ahrs.get_origin(ekf_origin)) {
|
||||
send_ekf_origin(ekf_origin);
|
||||
}
|
||||
result = MAV_RESULT_ACCEPTED;
|
||||
} else {
|
||||
result = MAV_RESULT_FAILED;
|
||||
}
|
||||
break;
|
||||
|
||||
case MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN:
|
||||
if (is_equal(packet.param1,1.0f) || is_equal(packet.param1,3.0f)) {
|
||||
AP_Notify::flags.firmware_update = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user