AP_OSD: rename AP_AHRS::get_position to get_location

This commit is contained in:
Peter Barker 2022-01-21 10:42:41 +11:00 committed by Andrew Tridgell
parent 88b463947a
commit 26c4b65d4e
2 changed files with 2 additions and 2 deletions

View File

@ -370,7 +370,7 @@ void AP_OSD::update_stats()
AP_AHRS &ahrs = AP::ahrs();
WITH_SEMAPHORE(ahrs.get_semaphore());
v = ahrs.groundspeed_vector();
home_is_set = ahrs.get_position(loc) && ahrs.home_is_set();
home_is_set = ahrs.get_location(loc) && ahrs.home_is_set();
if (home_is_set) {
home_loc = ahrs.get_home();
}

View File

@ -1559,7 +1559,7 @@ void AP_OSD_Screen::draw_home(uint8_t x, uint8_t y)
AP_AHRS &ahrs = AP::ahrs();
WITH_SEMAPHORE(ahrs.get_semaphore());
Location loc;
if (ahrs.get_position(loc) && ahrs.home_is_set()) {
if (ahrs.get_location(loc) && ahrs.home_is_set()) {
const Location &home_loc = ahrs.get_home();
float distance = home_loc.get_distance(loc);
int32_t angle = wrap_360_cd(loc.get_bearing_to(home_loc) - ahrs.yaw_sensor);