diff --git a/libraries/AP_Compass/AP_Compass.cpp b/libraries/AP_Compass/AP_Compass.cpp index 77bada92a3..5cf9e6dc2a 100644 --- a/libraries/AP_Compass/AP_Compass.cpp +++ b/libraries/AP_Compass/AP_Compass.cpp @@ -28,7 +28,7 @@ #include "AP_Compass.h" #include "Compass_learn.h" -extern AP_HAL::HAL& hal; +extern const AP_HAL::HAL& hal; #ifndef COMPASS_LEARN_DEFAULT #define COMPASS_LEARN_DEFAULT Compass::LEARN_NONE