From bf9b8f41bf911ba7cd8b16256612757d13967fba Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 13 Feb 2019 16:18:27 +1100 Subject: [PATCH] Tools: Replay: cope with WARN_IF_UNUSED on AP_AHRS::set_home --- Tools/Replay/Replay.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/Replay/Replay.cpp b/Tools/Replay/Replay.cpp index 182cf8204a..5b752b5f8d 100644 --- a/Tools/Replay/Replay.cpp +++ b/Tools/Replay/Replay.cpp @@ -639,7 +639,9 @@ void Replay::read_sensors(const char *type) loc.lng * 1.0e-7f, loc.alt * 0.01f, AP_HAL::millis()*0.001f); - _vehicle.ahrs.set_home(loc); + if (!_vehicle.ahrs.set_home(loc)) { + ::printf("Failed to set home to that location!"); + } _vehicle.compass.set_initial_location(loc.lat, loc.lng); done_home_init = true; }