mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
AP_AHRS: fixed example build
This commit is contained in:
parent
7b2d56a8cb
commit
35c111a63a
@ -48,12 +48,10 @@ AP_InertialSensor_HIL ins;
|
|||||||
|
|
||||||
AP_Compass_HMC5843 compass;
|
AP_Compass_HMC5843 compass;
|
||||||
|
|
||||||
GPS *g_gps;
|
AP_GPS gps;
|
||||||
|
|
||||||
AP_GPS_Auto g_gps_driver(&g_gps);
|
|
||||||
|
|
||||||
// choose which AHRS system to use
|
// choose which AHRS system to use
|
||||||
AP_AHRS_DCM ahrs(ins, baro, g_gps);
|
AP_AHRS_DCM ahrs(ins, baro, gps);
|
||||||
|
|
||||||
AP_Baro_HIL barometer;
|
AP_Baro_HIL barometer;
|
||||||
|
|
||||||
@ -82,10 +80,7 @@ void setup(void)
|
|||||||
} else {
|
} else {
|
||||||
hal.console->printf("No compass detected\n");
|
hal.console->printf("No compass detected\n");
|
||||||
}
|
}
|
||||||
g_gps = &g_gps_driver;
|
gps.init(NULL);
|
||||||
#if WITH_GPS
|
|
||||||
g_gps->init(hal.uartB);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop(void)
|
void loop(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user