Fix unable to disable GPS HOME mode. Fixes #91.

This commit is contained in:
Dominic Clifton 2014-09-27 00:20:04 +01:00
parent 6883a8f2a7
commit 03a5a20351
1 changed files with 2 additions and 2 deletions

View File

@ -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)) {