Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LCD info display corrections and date format tweak #344

Merged
merged 2 commits into from
Aug 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is more of a personal taste/country specific convention, so should probably handle separately, probably needs to be user configurable.

strftime(temp, sizeof(temp), "%Y-%m-%d", &timeinfo);
displayNameValue(1, "Date", temp);
_updateInfoLine = false;
} break;
Expand Down Expand Up @@ -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;
Expand Down