Merge pull request #6110 from codecae/gps_rescue_update_fix

Moved updateGPSRescueState to imuUpdateAttitude. gps_rescue.c tidy.
This commit is contained in:
Andrey Mironov 2018-06-14 01:01:33 +03:00 committed by GitHub
commit 7b035ce3a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 93 additions and 91 deletions

View File

@ -924,10 +924,6 @@ static FAST_CODE_NOINLINE void subTaskMainSubprocesses(timeUs_t currentTimeUs)
}
#endif
#ifdef USE_GPS_RESCUE
updateGPSRescueState();
#endif
#ifdef USE_SDCARD
afatfs_poll();
#endif

View File

@ -182,6 +182,8 @@ void updateGPSRescueState(void)
disarm();
rescueStop();
break;
default:
break;
}
performSanityChecks();

View File

@ -41,6 +41,7 @@
#include "flight/imu.h"
#include "flight/mixer.h"
#include "flight/pid.h"
#include "flight/gps_rescue.h"
#include "io/gps.h"
@ -521,6 +522,9 @@ void imuUpdateAttitude(timeUs_t currentTimeUs)
acc.accADC[Y] = 0;
acc.accADC[Z] = 0;
}
#ifdef USE_GPS_RESCUE
updateGPSRescueState();
#endif
}
bool shouldInitializeGPSHeading()