From d71c7b512f73add5cbe0b8faecd511d9948bb01e Mon Sep 17 00:00:00 2001 From: Jm Date: Thu, 31 Dec 2020 20:44:53 -0800 Subject: [PATCH] Cleanup some compile time warnings that were driving me crazy. --- src/graphics/Screen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 5e03c25f4..92e38337e 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -315,7 +315,7 @@ static void drawGPS(OLEDDisplay *display, int16_t x, int16_t y, const GPSStatus display->drawFastImage(x + 24, y, 8, 8, imgSatellite); // Draw the number of satellites - sprintf(satsString, "%lu", gps->getNumSatellites()); + sprintf(satsString, "%u", gps->getNumSatellites()); display->drawString(x + 34, y - 2, satsString); } } @@ -568,11 +568,11 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_ uint32_t agoSecs = sinceLastSeen(node); static char lastStr[20]; if (agoSecs < 120) // last 2 mins? - snprintf(lastStr, sizeof(lastStr), "%lu seconds ago", agoSecs); + snprintf(lastStr, sizeof(lastStr), "%u seconds ago", agoSecs); else if (agoSecs < 120 * 60) // last 2 hrs - snprintf(lastStr, sizeof(lastStr), "%lu minutes ago", agoSecs / 60); + snprintf(lastStr, sizeof(lastStr), "%u minutes ago", agoSecs / 60); else - snprintf(lastStr, sizeof(lastStr), "%lu hours ago", agoSecs / 60 / 60); + snprintf(lastStr, sizeof(lastStr), "%u hours ago", agoSecs / 60 / 60); static char distStr[20]; strcpy(distStr, "? km"); // might not have location data