diff --git a/firmware/hw_layer/mmc_card.cpp b/firmware/hw_layer/mmc_card.cpp index 1a44f7d157..4f6641d808 100644 --- a/firmware/hw_layer/mmc_card.cpp +++ b/firmware/hw_layer/mmc_card.cpp @@ -52,9 +52,9 @@ static int totalSyncCounter = 0; #define LOG_INDEX_FILENAME "index.txt" -#define RUSEFI_LOG_PREFIX "rus" -#define PREFIX_LEN 3 -#define SHORT_TIME_LEN 11 +#define RUSEFI_LOG_PREFIX "rusefi_" +#define PREFIX_LEN 7 +#define SHORT_TIME_LEN 13 #define LS_RESPONSE "ls_result" #define FILE_LIST_MAX_COUNT 20 diff --git a/firmware/hw_layer/rtc_helper.cpp b/firmware/hw_layer/rtc_helper.cpp index 45d0ecd503..c2a511ddd9 100644 --- a/firmware/hw_layer/rtc_helper.cpp +++ b/firmware/hw_layer/rtc_helper.cpp @@ -86,7 +86,7 @@ static void put2(int offset, char *lcd_str, int value) { */ bool dateToStringShort(char *lcd_str) { #if EFI_RTC - strcpy(lcd_str, "0000_000000\0"); + strcpy(lcd_str, "000000_000000\0"); struct tm timp; date_get_tm(&timp); if (timp.tm_year < 116 || timp.tm_year > 130) { @@ -94,11 +94,14 @@ bool dateToStringShort(char *lcd_str) { lcd_str[0] = 0; return false; } - put2(0, lcd_str, timp.tm_mon + 1); // months since January 0-11 - put2(2, lcd_str, timp.tm_mday); // day of the month 1-31 - put2(5, lcd_str, timp.tm_hour); // hours since midnight 0-23 - put2(7, lcd_str, timp.tm_min); - put2(9, lcd_str, timp.tm_sec); + + put2(0, lcd_str, timp.tm_year % 100); // Years since 1900 - format as just the last two digits + put2(2, lcd_str, timp.tm_mon + 1); // months since January 0-11 + put2(4, lcd_str, timp.tm_mday); // day of the month 1-31 + + put2(7, lcd_str, timp.tm_hour); // hours since midnight 0-23 + put2(9, lcd_str, timp.tm_min); // Minutes + put2(11, lcd_str, timp.tm_sec); // seconds return true; #else