AP_ExternalAHRS: Allow InertialLabs to be used as build option properly

build_options cannot autodetect InertialLabs since the feature is extracted as AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED (without the underscore).
This allows you to define in/out InertialLabs properly.
This commit is contained in:
James O'Shannessy 2024-08-13 09:15:31 +10:00 committed by Peter Barker
parent d225683d69
commit 39f7d7a3ad
5 changed files with 8 additions and 8 deletions

View File

@ -124,7 +124,7 @@ void AP_ExternalAHRS::init(void)
return; return;
#endif #endif
#if AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED #if AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED
case DevType::InertialLabs: case DevType::InertialLabs:
backend = NEW_NOTHROW AP_ExternalAHRS_InertialLabs(this, state); backend = NEW_NOTHROW AP_ExternalAHRS_InertialLabs(this, state);
return; return;

View File

@ -49,7 +49,7 @@ public:
#if AP_EXTERNAL_AHRS_MICROSTRAIN5_ENABLED #if AP_EXTERNAL_AHRS_MICROSTRAIN5_ENABLED
MicroStrain5 = 2, MicroStrain5 = 2,
#endif #endif
#if AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED #if AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED
InertialLabs = 5, InertialLabs = 5,
#endif #endif
// 3 reserved for AdNav // 3 reserved for AdNav

View File

@ -18,7 +18,7 @@
#include "AP_ExternalAHRS_config.h" #include "AP_ExternalAHRS_config.h"
#if AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED #if AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED
#include "AP_ExternalAHRS_InertialLabs.h" #include "AP_ExternalAHRS_InertialLabs.h"
#include <AP_Math/AP_Math.h> #include <AP_Math/AP_Math.h>
@ -692,5 +692,5 @@ void AP_ExternalAHRS_InertialLabs::send_status_report(GCS_MAVLINK &link) const
mag_var, 0, 0); mag_var, 0, 0);
} }
#endif // AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED #endif // AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED

View File

@ -20,7 +20,7 @@
#include "AP_ExternalAHRS_config.h" #include "AP_ExternalAHRS_config.h"
#if AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED #if AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED
#include "AP_ExternalAHRS_backend.h" #include "AP_ExternalAHRS_backend.h"
@ -228,5 +228,5 @@ private:
uint32_t last_gps_ms; uint32_t last_gps_ms;
}; };
#endif // AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED #endif // AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED

View File

@ -26,6 +26,6 @@
#define AP_EXTERNAL_AHRS_VECTORNAV_ENABLED AP_EXTERNAL_AHRS_BACKEND_DEFAULT_ENABLED #define AP_EXTERNAL_AHRS_VECTORNAV_ENABLED AP_EXTERNAL_AHRS_BACKEND_DEFAULT_ENABLED
#endif #endif
#ifndef AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED #ifndef AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED
#define AP_EXTERNAL_AHRS_INERTIAL_LABS_ENABLED AP_EXTERNAL_AHRS_BACKEND_DEFAULT_ENABLED #define AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED AP_EXTERNAL_AHRS_BACKEND_DEFAULT_ENABLED
#endif #endif