From 9deee2a805e20c2c29d32cbdc285ba03f49d7cfa Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 2 Jan 2019 13:54:09 +1100 Subject: [PATCH] AP_Fence: adjust for Location_Class and Location unification --- libraries/AC_Fence/AC_Fence.cpp | 4 ++-- libraries/AC_Fence/AC_Fence.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AC_Fence/AC_Fence.cpp b/libraries/AC_Fence/AC_Fence.cpp index fefad7c58c..f0beb4b3d0 100644 --- a/libraries/AC_Fence/AC_Fence.cpp +++ b/libraries/AC_Fence/AC_Fence.cpp @@ -359,12 +359,12 @@ uint8_t AC_Fence::check() } // returns true if the destination is within fence (used to reject waypoints outside the fence) -bool AC_Fence::check_destination_within_fence(const Location_Class& loc) +bool AC_Fence::check_destination_within_fence(const Location& loc) { // Altitude fence check if ((get_enabled_fences() & AC_FENCE_TYPE_ALT_MAX)) { int32_t alt_above_home_cm; - if (loc.get_alt_cm(Location_Class::ALT_FRAME_ABOVE_HOME, alt_above_home_cm)) { + if (loc.get_alt_cm(Location::ALT_FRAME_ABOVE_HOME, alt_above_home_cm)) { if ((alt_above_home_cm * 0.01f) > _alt_max) { return false; } diff --git a/libraries/AC_Fence/AC_Fence.h b/libraries/AC_Fence/AC_Fence.h index b2ecf92c1c..d0115b8496 100644 --- a/libraries/AC_Fence/AC_Fence.h +++ b/libraries/AC_Fence/AC_Fence.h @@ -59,7 +59,7 @@ public: uint8_t check(); // returns true if the destination is within fence (used to reject waypoints outside the fence) - bool check_destination_within_fence(const Location_Class& loc); + bool check_destination_within_fence(const Location& loc); /// get_breaches - returns bit mask of the fence types that have been breached uint8_t get_breaches() const { return _breached_fences; }