Browse Source

LCD Longer print

Petr Zahradník junior 8 years ago
parent
commit
2d7fe9dc78
3 changed files with 20 additions and 5 deletions
  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 View File

189
 #define MSG_ERR_MINTEMP_BED                 "NIZ. TEPL. PODL."
189
 #define MSG_ERR_MINTEMP_BED                 "NIZ. TEPL. PODL."
190
 #define MSG_HALTED                          "TISK. ZASTAVENA"
190
 #define MSG_HALTED                          "TISK. ZASTAVENA"
191
 #define MSG_PLEASE_RESET                    "Provedte reset"
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
 #define MSG_HEATING                         "Zahrivani..."
195
 #define MSG_HEATING                         "Zahrivani..."
193
 #define MSG_HEATING_COMPLETE                "Zahrati hotovo."
196
 #define MSG_HEATING_COMPLETE                "Zahrati hotovo."
194
 #define MSG_BED_HEATING                     "Zahrivani podl."
197
 #define MSG_BED_HEATING                     "Zahrivani podl."

+ 8
- 2
Marlin/language_en.h View File

488
 #ifndef MSG_PLEASE_RESET
488
 #ifndef MSG_PLEASE_RESET
489
   #define MSG_PLEASE_RESET                    "Please reset"
489
   #define MSG_PLEASE_RESET                    "Please reset"
490
 #endif
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
 #endif
499
 #endif
494
 #ifndef MSG_PRINT_TIME
500
 #ifndef MSG_PRINT_TIME
495
   #define MSG_PRINT_TIME                      "Print time"
501
   #define MSG_PRINT_TIME                      "Print time"

+ 9
- 3
Marlin/ultralcd.cpp View File

1969
         print_job_counter.loadStats();
1969
         print_job_counter.loadStats();
1970
         printStatistics stats = print_job_counter.getStats();
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
         START_SCREEN();                                                                              // 12345678901234567890
1980
         START_SCREEN();                                                                              // 12345678901234567890
1976
         STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints));        // Print Count: 999
1981
         STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints));        // Print Count: 999
1977
         STATIC_ITEM(MSG_INFO_COMPLETED_PRINTS": ", false, false, itostr3left(stats.finishedPrints)); // Completed  : 666
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
         END_SCREEN();
1985
         END_SCREEN();
1980
       }
1986
       }
1981
     #endif // PRINTCOUNTER
1987
     #endif // PRINTCOUNTER

Loading…
Cancel
Save