From aa936ade7e0e30eff466b88ce450addc1702472b Mon Sep 17 00:00:00 2001 From: Sam <35611307+syund@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:01:41 -0400 Subject: [PATCH] Use geoCoord object to draw altitude --- src/graphics/Screen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 8fd8c8956..bd08218fd 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -383,8 +383,8 @@ static void drawGPSAltitude(OLEDDisplay *display, int16_t x, int16_t y, const GP // displayLine = "No GPS Lock"; // display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine); } else { - - displayLine = "Altitude: " + String(gps->getAltitude()) + "m"; + geoCoord.updateCoords(int32_t(gps->getLatitude()), int32_t(gps->getLongitude()), int32_t(gps->getAltitude())); + displayLine = "Altitude: " + String(geoCoord.getAltitude()) + "m"; display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine); } }