AP_Vehicle: don't create compass singleton if compass not enabled

This commit is contained in:
Peter Barker 2024-02-23 19:35:39 +11:00 committed by Andrew Tridgell
parent 53fd9056d8
commit df8801955d
1 changed files with 2 additions and 0 deletions

View File

@ -317,7 +317,9 @@ protected:
AP_GPS gps;
#endif
AP_Baro barometer;
#if AP_COMPASS_ENABLED
Compass compass;
#endif
#if AP_INERTIALSENSOR_ENABLED
AP_InertialSensor ins;
#endif