From dc454881df04e5e492427fb78611f42428b90d62 Mon Sep 17 00:00:00 2001 From: Alexander Malishev Date: Fri, 6 Jul 2018 00:01:09 +0400 Subject: [PATCH] AP_OSD: increased lat/lon field Lattitude integer part could be 4 char wide like -171.123 --- libraries/AP_OSD/AP_OSD_Screen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_OSD/AP_OSD_Screen.cpp b/libraries/AP_OSD/AP_OSD_Screen.cpp index 50f638e9b8..40a239ac12 100644 --- a/libraries/AP_OSD/AP_OSD_Screen.cpp +++ b/libraries/AP_OSD/AP_OSD_Screen.cpp @@ -526,7 +526,7 @@ void AP_OSD_Screen::draw_gps_latitude(uint8_t x, uint8_t y) dec_portion = loc.lat / 10000000L; frac_portion = abs_lat - labs(dec_portion)*10000000UL; - backend->write(x, y, false, "%c%3ld.%07ld", SYM_GPS_LAT, (long)dec_portion,(long)frac_portion); + backend->write(x, y, false, "%c%4ld.%07ld", SYM_GPS_LAT, (long)dec_portion,(long)frac_portion); } void AP_OSD_Screen::draw_gps_longitude(uint8_t x, uint8_t y) @@ -539,7 +539,7 @@ void AP_OSD_Screen::draw_gps_longitude(uint8_t x, uint8_t y) dec_portion = loc.lng / 10000000L; frac_portion = abs_lon - labs(dec_portion)*10000000UL; - backend->write(x, y, false, "%c%3ld.%07ld", SYM_GPS_LONG, (long)dec_portion,(long)frac_portion); + backend->write(x, y, false, "%c%4ld.%07ld", SYM_GPS_LONG, (long)dec_portion,(long)frac_portion); } #define DRAW_SETTING(n) if (n.enabled) draw_ ## n(n.xpos, n.ypos)