mirror of https://github.com/ArduPilot/ardupilot
AP_AHRS: cope with AP_INERTIAL_SENSOR being 0
This commit is contained in:
parent
eec43c204f
commit
1e41030167
|
@ -76,12 +76,20 @@ public:
|
|||
|
||||
// get the index of the current primary accelerometer sensor
|
||||
virtual uint8_t get_primary_accel_index(void) const {
|
||||
#if AP_INERTIALSENSOR_ENABLED
|
||||
return AP::ins().get_primary_accel();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// get the index of the current primary gyro sensor
|
||||
virtual uint8_t get_primary_gyro_index(void) const {
|
||||
#if AP_INERTIALSENSOR_ENABLED
|
||||
return AP::ins().get_primary_gyro();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Methods
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
#endif
|
||||
|
||||
#ifndef HAL_NAVEKF3_AVAILABLE
|
||||
#define HAL_NAVEKF3_AVAILABLE 1
|
||||
#define HAL_NAVEKF3_AVAILABLE AP_INERTIALSENSOR_ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef AP_AHRS_SIM_ENABLED
|
||||
#define AP_AHRS_SIM_ENABLED AP_SIM_ENABLED
|
||||
#define AP_AHRS_SIM_ENABLED AP_SIM_ENABLED && AP_INERTIALSENSOR_ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef AP_AHRS_POSITION_RESET_ENABLED
|
||||
|
|
Loading…
Reference in New Issue