Skip to content

Commit

Permalink
AP_ICEngine: Update for AHRS NED changes
Browse files Browse the repository at this point in the history
  • Loading branch information
WickedShell authored and tridge committed Feb 12, 2017
1 parent d71533d commit 42b6ca9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_ICEngine/AP_ICEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 42b6ca9

Please sign in to comment.