mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
ArduCopter: eliminate AP::ahrs().get_location
This commit is contained in:
parent
34ff53f158
commit
a38879f77e
@ -24,7 +24,7 @@ void Copter::set_home_to_current_location_inflight() {
|
||||
// get current location from EKF
|
||||
Location temp_loc;
|
||||
Location ekf_origin;
|
||||
if (ahrs.get_location(temp_loc) && ahrs.get_origin(ekf_origin)) {
|
||||
if (ahrs.get_position(temp_loc) && ahrs.get_origin(ekf_origin)) {
|
||||
temp_loc.alt = ekf_origin.alt;
|
||||
if (!set_home(temp_loc, false)) {
|
||||
return;
|
||||
@ -40,7 +40,7 @@ void Copter::set_home_to_current_location_inflight() {
|
||||
bool Copter::set_home_to_current_location(bool lock) {
|
||||
// get current location from EKF
|
||||
Location temp_loc;
|
||||
if (ahrs.get_location(temp_loc)) {
|
||||
if (ahrs.get_position(temp_loc)) {
|
||||
if (!set_home(temp_loc, lock)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user