From b041571ef0fbdd7bb4857841f6c0a0076385fb7e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 17 Apr 2022 11:30:35 -0500 Subject: [PATCH 1/2] Correct capitalization of metric units We should be going from kilowatts to megawatts, not milliwatts. All units above 'k' should be capital letters. --- src/lcd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lcd.cpp b/src/lcd.cpp index 5b8ff114..d4d9ea42 100644 --- a/src/lcd.cpp +++ b/src/lcd.cpp @@ -624,10 +624,10 @@ void LcdTask::displayScaledNumberValue(int line, const char *name, double value, static const char *mod[] = { "", "k", - "m", - "g", - "t", - "p" + "M", + "G", + "T", + "P" }; int index = 0; From b8d4154dadb0c090225fbb3e41865826b843522f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 17 Apr 2022 11:34:31 -0500 Subject: [PATCH 2/2] Print LCD date in ISO 8601 format This is unambiguous to interpret in all parts of the world, including the US, UK, and Europe. --- src/lcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lcd.cpp b/src/lcd.cpp index d4d9ea42..4d658a52 100644 --- a/src/lcd.cpp +++ b/src/lcd.cpp @@ -546,7 +546,7 @@ void LcdTask::displayInfoLine(LcdInfoLine line, unsigned long &nextUpdate) gettimeofday(&local_time, NULL); struct tm timeinfo; localtime_r(&local_time.tv_sec, &timeinfo); - strftime(temp, sizeof(temp), "%d/%m/%Y", &timeinfo); + strftime(temp, sizeof(temp), "%Y-%m-%d", &timeinfo); displayNameValue(1, "Date", temp); _updateInfoLine = false; } break;