mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_InertialSensor: fixed example build
This commit is contained in:
parent
39d623ff94
commit
520727e5bd
@ -39,27 +39,7 @@
|
||||
|
||||
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;
|
||||
|
||||
#define CONFIG_INS_TYPE HAL_INS_DEFAULT
|
||||
|
||||
#if CONFIG_INS_TYPE == HAL_INS_MPU6000
|
||||
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_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;
|
||||
#elif CONFIG_INS_TYPE == HAL_INS_L3GD20
|
||||
AP_InertialSensor_L3GD20 ins;
|
||||
#else
|
||||
#error Unrecognised CONFIG_INS_TYPE setting.
|
||||
#endif // CONFIG_INS_TYPE
|
||||
AP_InertialSensor ins;
|
||||
|
||||
void setup(void)
|
||||
{
|
||||
@ -210,7 +190,7 @@ void run_test()
|
||||
while( !hal.console->available() ) {
|
||||
|
||||
// wait until we have a sample
|
||||
ins.wait_for_sample(1000);
|
||||
ins.wait_for_sample();
|
||||
|
||||
// read samples from ins
|
||||
ins.update();
|
||||
|
Loading…
Reference in New Issue
Block a user