Ver código fonte

LCD Longer print

Petr Zahradník junior 8 anos atrás
pai
commit
2d7fe9dc78
3 arquivos alterados com 20 adições e 5 exclusões
  1. 3
    0
      Marlin/language_cz.h
  2. 8
    2
      Marlin/language_en.h
  3. 9
    3
      Marlin/ultralcd.cpp

+ 3
- 0
Marlin/language_cz.h Ver arquivo

@@ -189,6 +189,9 @@
189 189
 #define MSG_ERR_MINTEMP_BED                 "NIZ. TEPL. PODL."
190 190
 #define MSG_HALTED                          "TISK. ZASTAVENA"
191 191
 #define MSG_PLEASE_RESET                    "Provedte reset"
192
+#define MSG_SHORT_DAY                       "d"
193
+#define MSG_SHORT_HOUR                      "h"
194
+#define MSG_SHORT_MINUTE                    "m"
192 195
 #define MSG_HEATING                         "Zahrivani..."
193 196
 #define MSG_HEATING_COMPLETE                "Zahrati hotovo."
194 197
 #define MSG_BED_HEATING                     "Zahrivani podl."

+ 8
- 2
Marlin/language_en.h Ver arquivo

@@ -488,8 +488,14 @@
488 488
 #ifndef MSG_PLEASE_RESET
489 489
   #define MSG_PLEASE_RESET                    "Please reset"
490 490
 #endif
491
-#ifndef MSG_END_DAY
492
-  #define MSG_END_DAY                         "days"
491
+#ifndef MSG_SHORT_DAY
492
+  #define MSG_SHORT_DAY                       "d" // One character only
493
+#endif
494
+#ifndef MSG_SHORT_HOUR
495
+  #define MSG_SHORT_HOUR                      "h" // One character only
496
+#endif
497
+#ifndef MSG_SHORT_MINUTE
498
+  #define MSG_SHORT_MINUTE                    "m" // One character only
493 499
 #endif
494 500
 #ifndef MSG_PRINT_TIME
495 501
   #define MSG_PRINT_TIME                      "Print time"

+ 9
- 3
Marlin/ultralcd.cpp Ver arquivo

@@ -1969,13 +1969,19 @@ void kill_screen(const char* lcd_msg) {
1969 1969
         print_job_counter.loadStats();
1970 1970
         printStatistics stats = print_job_counter.getStats();
1971 1971
 
1972
-        char timeString[8];
1973
-        sprintf_P(timeString, PSTR("%i:%02i"), int(stats.printTime / 60 / 60), int(stats.printTime / 60) % 60);
1972
+        char timeString[14];
1973
+        sprintf_P(timeString,
1974
+        PSTR("%i" MSG_SHORT_DAY " %i" MSG_SHORT_HOUR " %i" MSG_SHORT_MINUTE),
1975
+          int(stats.printTime / 60 / 60 / 24),
1976
+          int((stats.printTime / 60 / 60) % 24),
1977
+          int((stats.printTime / 60) % 60)
1978
+        );
1974 1979
 
1975 1980
         START_SCREEN();                                                                              // 12345678901234567890
1976 1981
         STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints));        // Print Count: 999
1977 1982
         STATIC_ITEM(MSG_INFO_COMPLETED_PRINTS": ", false, false, itostr3left(stats.finishedPrints)); // Completed  : 666
1978
-        STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false, timeString);                             // Total Time : 123:45
1983
+        STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false);                                         // Total Time :
1984
+        STATIC_ITEM("  ", false, false, timeString);                                                 //   12345d 12h 34m
1979 1985
         END_SCREEN();
1980 1986
       }
1981 1987
     #endif // PRINTCOUNTER

Carregando…
Cancelar
Salvar