mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -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;
|
||||
|
||||
GPS *g_gps;
|
||||
|
||||
AP_GPS_Auto g_gps_driver(&g_gps);
|
||||
AP_GPS gps;
|
||||
|
||||
// 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;
|
||||
|
||||
@ -82,10 +80,7 @@ void setup(void)
|
||||
} else {
|
||||
hal.console->printf("No compass detected\n");
|
||||
}
|
||||
g_gps = &g_gps_driver;
|
||||
#if WITH_GPS
|
||||
g_gps->init(hal.uartB);
|
||||
#endif
|
||||
gps.init(NULL);
|
||||
}
|
||||
|
||||
void loop(void)
|
||||
|
Loading…
Reference in New Issue
Block a user