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:
parent
a451e0e6a0
commit
dfa58ef9d3
5 changed files with 5 additions and 5 deletions
|
@ -200,7 +200,7 @@ void resetNavConfig(navConfig_t * navConfig)
|
||||||
navConfig->flags.disarm_on_landing = 0;
|
navConfig->flags.disarm_on_landing = 0;
|
||||||
|
|
||||||
// Inertial position estimator parameters
|
// Inertial position estimator parameters
|
||||||
#if defined(INAV_ENABLE_AUTO_MAG_DECLINATION)
|
#if defined(NAV_AUTO_MAG_DECLINATION)
|
||||||
navConfig->inav.automatic_mag_declination = 1;
|
navConfig->inav.automatic_mag_declination = 1;
|
||||||
#endif
|
#endif
|
||||||
navConfig->inav.gps_min_sats = 6;
|
navConfig->inav.gps_min_sats = 6;
|
||||||
|
|
|
@ -73,7 +73,7 @@ typedef struct navConfig_s {
|
||||||
} flags;
|
} flags;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
#if defined(INAV_ENABLE_AUTO_MAG_DECLINATION)
|
#if defined(NAV_AUTO_MAG_DECLINATION)
|
||||||
uint8_t automatic_mag_declination;
|
uint8_t automatic_mag_declination;
|
||||||
#endif
|
#endif
|
||||||
uint8_t gps_min_sats;
|
uint8_t gps_min_sats;
|
||||||
|
|
|
@ -274,7 +274,7 @@ void onNewGPSData(void)
|
||||||
isFirstGPSUpdate = true;
|
isFirstGPSUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(INAV_ENABLE_AUTO_MAG_DECLINATION)
|
#if defined(NAV_AUTO_MAG_DECLINATION)
|
||||||
/* Automatic magnetic declination calculation - do this once */
|
/* Automatic magnetic declination calculation - do this once */
|
||||||
static bool magDeclinationSet = false;
|
static bool magDeclinationSet = false;
|
||||||
if (posControl.navConfig->inav.automatic_mag_declination && !magDeclinationSet) {
|
if (posControl.navConfig->inav.automatic_mag_declination && !magDeclinationSet) {
|
||||||
|
|
|
@ -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_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 },
|
{ "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 },
|
{ "inav_auto_mag_decl", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.navConfig.inav.automatic_mag_declination, .config.lookup = { TABLE_OFF_ON }, 0 },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@
|
||||||
#define GPS_PROTO_NAZA
|
#define GPS_PROTO_NAZA
|
||||||
|
|
||||||
#define NAV
|
#define NAV
|
||||||
//#define NAV_AUTO_MAG_DECLINATION
|
#define NAV_AUTO_MAG_DECLINATION
|
||||||
#define NAV_GPS_GLITCH_DETECTION
|
#define NAV_GPS_GLITCH_DETECTION
|
||||||
|
|
||||||
#define SERIAL_RX
|
#define SERIAL_RX
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue