diff --git a/libraries/AP_OSD/AP_OSD_Screen.cpp b/libraries/AP_OSD/AP_OSD_Screen.cpp index 2282268cc6..2385978844 100644 --- a/libraries/AP_OSD/AP_OSD_Screen.cpp +++ b/libraries/AP_OSD/AP_OSD_Screen.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #if APM_BUILD_TYPE(APM_BUILD_Rover) #include #endif @@ -1455,8 +1456,10 @@ void AP_OSD_Screen::draw_horizon(uint8_t x, uint8_t y) { AP_AHRS &ahrs = AP::ahrs(); WITH_SEMAPHORE(ahrs.get_semaphore()); - float roll = ahrs.roll; - float pitch = -ahrs.pitch; + float roll; + float pitch; + AP::vehicle()->get_osd_roll_pitch_rad(roll,pitch); + pitch *= -1; //inverted roll AH if (check_option(AP_OSD::OPTION_INVERTED_AH_ROLL)) {