mirror of https://github.com/ArduPilot/ardupilot
AntennaTracker: convert to new AP_InertialSensor API
This commit is contained in:
parent
4c0351a76a
commit
a4d2b044f0
|
@ -144,29 +144,11 @@ static AP_Compass_HIL compass;
|
||||||
#error Unrecognized CONFIG_COMPASS setting
|
#error Unrecognized CONFIG_COMPASS setting
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_INS_TYPE == HAL_INS_OILPAN || CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
||||||
AP_ADC_ADS7844 apm1_adc;
|
AP_ADC_ADS7844 apm1_adc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_INS_TYPE == HAL_INS_MPU6000
|
AP_InertialSensor ins;
|
||||||
AP_InertialSensor_MPU6000 ins;
|
|
||||||
#elif CONFIG_INS_TYPE == HAL_INS_PX4
|
|
||||||
AP_InertialSensor_PX4 ins;
|
|
||||||
#elif CONFIG_INS_TYPE == HAL_INS_VRBRAIN
|
|
||||||
AP_InertialSensor_VRBRAIN ins;
|
|
||||||
#elif CONFIG_INS_TYPE == HAL_INS_HIL
|
|
||||||
AP_InertialSensor_HIL ins;
|
|
||||||
#elif CONFIG_INS_TYPE == HAL_INS_OILPAN
|
|
||||||
AP_InertialSensor_Oilpan ins( &apm1_adc );
|
|
||||||
#elif CONFIG_INS_TYPE == HAL_INS_FLYMAPLE
|
|
||||||
AP_InertialSensor_Flymaple ins;
|
|
||||||
#elif CONFIG_INS_TYPE == HAL_INS_L3G4200D
|
|
||||||
AP_InertialSensor_L3G4200D ins;
|
|
||||||
#elif CONFIG_INS_TYPE == HAL_INS_MPU9250
|
|
||||||
AP_InertialSensor_MPU9250 ins;
|
|
||||||
#else
|
|
||||||
#error Unrecognised CONFIG_INS_TYPE setting.
|
|
||||||
#endif // CONFIG_INS_TYPE
|
|
||||||
|
|
||||||
// Inertial Navigation EKF
|
// Inertial Navigation EKF
|
||||||
#if AP_AHRS_NAVEKF_AVAILABLE
|
#if AP_AHRS_NAVEKF_AVAILABLE
|
||||||
|
@ -300,9 +282,7 @@ void setup()
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
// wait for an INS sample
|
// wait for an INS sample
|
||||||
if (!ins.wait_for_sample(1000)) {
|
ins.wait_for_sample();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// tell the scheduler one tick has passed
|
// tell the scheduler one tick has passed
|
||||||
scheduler.tick();
|
scheduler.tick();
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#define ENABLE ENABLED
|
#define ENABLE ENABLED
|
||||||
#define DISABLE DISABLED
|
#define DISABLE DISABLED
|
||||||
|
|
||||||
#define CONFIG_INS_TYPE HAL_INS_DEFAULT
|
|
||||||
#define CONFIG_BARO HAL_BARO_DEFAULT
|
#define CONFIG_BARO HAL_BARO_DEFAULT
|
||||||
#define CONFIG_COMPASS HAL_COMPASS_DEFAULT
|
#define CONFIG_COMPASS HAL_COMPASS_DEFAULT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue