fix compiler warnings

This commit is contained in:
geeksville 2020-04-23 13:26:53 -07:00
parent b77c068881
commit 16998ebd8d

View File

@ -320,11 +320,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), "%d seconds ago", agoSecs);
snprintf(lastStr, sizeof(lastStr), "%lu seconds ago", agoSecs);
else if (agoSecs < 120 * 60) // last 2 hrs
snprintf(lastStr, sizeof(lastStr), "%d minutes ago", agoSecs / 60);
snprintf(lastStr, sizeof(lastStr), "%lu minutes ago", agoSecs / 60);
else
snprintf(lastStr, sizeof(lastStr), "%d hours ago", agoSecs / 60 / 60);
snprintf(lastStr, sizeof(lastStr), "%lu hours ago", agoSecs / 60 / 60);
static float simRadian;
simRadian += 0.1; // For testing, have the compass spin unless both