1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 16:25:26 +03:00

NAV: Fixed compilation errors for automatic mag declination. #define name is now NAV_AUTO_MAG_DECLINATION. Closes #182

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2016-05-04 12:00:07 +10:00
parent a451e0e6a0
commit dfa58ef9d3
5 changed files with 5 additions and 5 deletions

View file

@ -200,7 +200,7 @@ void resetNavConfig(navConfig_t * navConfig)
navConfig->flags.disarm_on_landing = 0;
// Inertial position estimator parameters
#if defined(INAV_ENABLE_AUTO_MAG_DECLINATION)
#if defined(NAV_AUTO_MAG_DECLINATION)
navConfig->inav.automatic_mag_declination = 1;
#endif
navConfig->inav.gps_min_sats = 6;

View file

@ -73,7 +73,7 @@ typedef struct navConfig_s {
} flags;
struct {
#if defined(INAV_ENABLE_AUTO_MAG_DECLINATION)
#if defined(NAV_AUTO_MAG_DECLINATION)
uint8_t automatic_mag_declination;
#endif
uint8_t gps_min_sats;

View file

@ -274,7 +274,7 @@ void onNewGPSData(void)
isFirstGPSUpdate = true;
}
#if defined(INAV_ENABLE_AUTO_MAG_DECLINATION)
#if defined(NAV_AUTO_MAG_DECLINATION)
/* Automatic magnetic declination calculation - do this once */
static bool magDeclinationSet = false;
if (posControl.navConfig->inav.automatic_mag_declination && !magDeclinationSet) {

View file

@ -565,7 +565,7 @@ const clivalue_t valueTable[] = {
{ "nav_navr_i", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.I8[PIDNAVR], .config.minmax = { 0, 255 }, 0 },
{ "nav_navr_d", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.D8[PIDNAVR], .config.minmax = { 0, 255 }, 0 },
#if defined(INAV_ENABLE_AUTO_MAG_DECLINATION)
#if defined(NAV_AUTO_MAG_DECLINATION)
{ "inav_auto_mag_decl", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.navConfig.inav.automatic_mag_declination, .config.lookup = { TABLE_OFF_ON }, 0 },
#endif

View file

@ -173,7 +173,7 @@
#define GPS_PROTO_NAZA
#define NAV
//#define NAV_AUTO_MAG_DECLINATION
#define NAV_AUTO_MAG_DECLINATION
#define NAV_GPS_GLITCH_DETECTION
#define SERIAL_RX