AP_InertialSensor: fixed example build

This commit is contained in:
Andrew Tridgell 2014-10-16 12:55:01 +11:00
parent 39d623ff94
commit 520727e5bd

View File

@ -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();