Browse Source

Plane: rename parameter to avoid name conflict with lock

c415-sdk
Peter Barker 6 years ago committed by Peter Barker
parent
commit
87058ef141
  1. 8
      ArduPlane/GCS_Mavlink.cpp

8
ArduPlane/GCS_Mavlink.cpp

@ -709,22 +709,22 @@ void GCS_MAVLINK_Plane::packetReceived(const mavlink_status_t &status,
} }
bool GCS_MAVLINK_Plane::set_home_to_current_location(bool lock) bool GCS_MAVLINK_Plane::set_home_to_current_location(bool _lock)
{ {
if (!plane.set_home_persistently(AP::gps().location())) { if (!plane.set_home_persistently(AP::gps().location())) {
return false; return false;
} }
if (lock) { if (_lock) {
AP::ahrs().lock_home(); AP::ahrs().lock_home();
} }
return true; return true;
} }
bool GCS_MAVLINK_Plane::set_home(const Location& loc, bool lock) bool GCS_MAVLINK_Plane::set_home(const Location& loc, bool _lock)
{ {
if (!AP::ahrs().set_home(loc)) { if (!AP::ahrs().set_home(loc)) {
return false; return false;
} }
if (lock) { if (_lock) {
AP::ahrs().lock_home(); AP::ahrs().lock_home();
} }
return true; return true;

Loading…
Cancel
Save