From 03a5a20351e8fb59a8ce29fb91d704c1236e852d Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Sat, 27 Sep 2014 00:20:04 +0100 Subject: [PATCH] Fix unable to disable GPS HOME mode. Fixes #91. --- src/main/flight/navigation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/flight/navigation.c b/src/main/flight/navigation.c index 33cc722a..8c89dd14 100644 --- a/src/main/flight/navigation.c +++ b/src/main/flight/navigation.c @@ -653,7 +653,7 @@ void updateGpsWaypointsAndMode(void) if (STATE(GPS_FIX) && GPS_numSat >= 5) { // if both GPS_HOME & GPS_HOLD are checked => GPS_HOME is the priority if (rcOptions[BOXGPSHOME]) { - if (!STATE(GPS_HOME_MODE)) { + if (!FLIGHT_MODE(GPS_HOME_MODE)) { ENABLE_FLIGHT_MODE(GPS_HOME_MODE); DISABLE_FLIGHT_MODE(GPS_HOLD_MODE); GPSNavReset = 0; @@ -661,7 +661,7 @@ void updateGpsWaypointsAndMode(void) nav_mode = NAV_MODE_WP; } } else { - DISABLE_STATE(GPS_HOME_MODE); + DISABLE_FLIGHT_MODE(GPS_HOME_MODE); if (rcOptions[BOXGPSHOLD] && areSticksInApModePosition(gpsProfile->ap_mode)) { if (!FLIGHT_MODE(GPS_HOLD_MODE)) {