Tracker: make setting of home boolean in preparation for sanity checks

This commit is contained in:
Peter Barker 2018-05-30 10:49:29 +10:00 committed by Peter Barker
parent 8937ef3190
commit f4097d254c
2 changed files with 5 additions and 3 deletions

View File

@ -28,8 +28,8 @@ protected:
return 0; // what if we have been picked up and carried somewhere?
}
bool set_home_to_current_location(bool lock) override { return false; }
bool set_home(const Location& loc, bool lock) override { return false; }
bool set_home_to_current_location(bool lock) override WARN_IF_UNUSED { return false; }
bool set_home(const Location& loc, bool lock) override WARN_IF_UNUSED { return false; }
private:

View File

@ -156,7 +156,9 @@ void Tracker::set_home(struct Location temp)
// check EKF origin has been set
Location ekf_origin;
if (ahrs.get_origin(ekf_origin)) {
ahrs.set_home(temp);
if (!ahrs.set_home(temp)) {
// ignore error silently
}
}
}