From 42b6ca9eed44bac7686023f99d7c775ad6c3c668 Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Mon, 30 Jan 2017 12:09:03 -0700 Subject: [PATCH] AP_ICEngine: Update for AHRS NED changes --- libraries/AP_ICEngine/AP_ICEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_ICEngine/AP_ICEngine.cpp b/libraries/AP_ICEngine/AP_ICEngine.cpp index e592c83cce50f..8cf5b67f7b95e 100644 --- a/libraries/AP_ICEngine/AP_ICEngine.cpp +++ b/libraries/AP_ICEngine/AP_ICEngine.cpp @@ -152,7 +152,7 @@ void AP_ICEngine::update(void) Vector3f pos; if (!should_run) { state = ICE_OFF; - } else if (ahrs.get_relative_position_NED(pos)) { + } else if (ahrs.get_relative_position_NED_origin(pos)) { if (height_pending) { height_pending = false; initial_height = -pos.z; @@ -201,7 +201,7 @@ void AP_ICEngine::update(void) if (state == ICE_START_HEIGHT_DELAY) { // when disarmed we can be waiting for takeoff Vector3f pos; - if (ahrs.get_relative_position_NED(pos)) { + if (ahrs.get_relative_position_NED_origin(pos)) { // reset initial height while disarmed initial_height = -pos.z; }