|
@@ -271,16 +271,6 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
|
271
|
271
|
} \
|
272
|
272
|
_menuItemNr++
|
273
|
273
|
|
274
|
|
- // Same as STATIC_ITEM, but can display variables. Do not use for text strings.
|
275
|
|
- #define STATIC_ITEM_VAR(label, args...) \
|
276
|
|
- if (_menuItemNr == _lineNr) { \
|
277
|
|
- if (encoderLine == _menuItemNr && _menuItemNr < LCD_HEIGHT - 1) \
|
278
|
|
- encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
|
279
|
|
- if (lcdDrawUpdate) \
|
280
|
|
- lcd_implementation_drawmenu_static(_drawLineNr, label, ## args); \
|
281
|
|
- } \
|
282
|
|
- _menuItemNr++
|
283
|
|
-
|
284
|
274
|
#if ENABLED(ENCODER_RATE_MULTIPLIER)
|
285
|
275
|
|
286
|
276
|
//#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
|
|
@@ -1914,10 +1904,11 @@ static void lcd_status_screen() {
|
1914
|
1904
|
#endif //SDSUPPORT
|
1915
|
1905
|
|
1916
|
1906
|
#if ENABLED(LCD_INFO_MENU)
|
|
1907
|
+
|
1917
|
1908
|
#if ENABLED(PRINTCOUNTER)
|
1918
|
1909
|
/**
|
1919
|
1910
|
*
|
1920
|
|
- * Printer Info > Stastics submenu
|
|
1911
|
+ * About Printer > Stastics submenu
|
1921
|
1912
|
*
|
1922
|
1913
|
*/
|
1923
|
1914
|
static void lcd_info_stats_menu() {
|
|
@@ -1925,28 +1916,21 @@ static void lcd_status_screen() {
|
1925
|
1916
|
print_job_counter.loadStats();
|
1926
|
1917
|
printStatistics stats = print_job_counter.getStats();
|
1927
|
1918
|
|
1928
|
|
- char totalPrints[18];
|
1929
|
|
- itoa(stats.totalPrints, totalPrints, 10);
|
1930
|
|
- char finishedPrints[18];
|
1931
|
|
- itoa(stats.finishedPrints, finishedPrints, 10);
|
1932
|
|
- char printTime[18];
|
1933
|
|
- itoa(stats.printTime, printTime, 10);
|
|
1919
|
+ char printTime[6];
|
|
1920
|
+ sprintf(printTime, "%02d:%02d", stats.printTime / 60, stats.printTime % 60);
|
1934
|
1921
|
|
1935
|
1922
|
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
1936
|
1923
|
START_MENU();
|
1937
|
|
- STATIC_ITEM(MSG_INFO_TOTAL_PRINTS ": "); // Total Prints:
|
1938
|
|
- STATIC_ITEM_VAR(totalPrints); // 999
|
1939
|
|
- STATIC_ITEM(MSG_INFO_FINISHED_PRINTS ": "); // Finished Prints:
|
1940
|
|
- STATIC_ITEM_VAR(finishedPrints); // 666
|
1941
|
|
- STATIC_ITEM(MSG_INFO_PRINT_TIME ": "); // Total Print Time:
|
1942
|
|
- STATIC_ITEM_VAR(printTime); // 123456
|
|
1924
|
+ STATIC_ITEM(MSG_INFO_TOTAL_PRINTS ": ", itostr3left(stats.totalPrints)); // Total Prints: 999
|
|
1925
|
+ STATIC_ITEM(MSG_INFO_FINISHED_PRINTS ": ", itostr3left(stats.finishedPrints)); // Finished Prints: 666
|
|
1926
|
+ STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", printTime); // Total Print Time: 123456
|
1943
|
1927
|
END_MENU();
|
1944
|
1928
|
}
|
1945
|
|
- #endif
|
1946
|
|
-
|
|
1929
|
+ #endif // PRINTCOUNTER
|
|
1930
|
+
|
1947
|
1931
|
/**
|
1948
|
1932
|
*
|
1949
|
|
- * Printer Info > Thermistors
|
|
1933
|
+ * About Printer > Thermistors
|
1950
|
1934
|
*
|
1951
|
1935
|
*/
|
1952
|
1936
|
static void lcd_info_thermistors_menu() {
|
|
@@ -1984,7 +1968,7 @@ static void lcd_status_screen() {
|
1984
|
1968
|
STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_3_MINTEMP));
|
1985
|
1969
|
STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_3_MAXTEMP));
|
1986
|
1970
|
#endif
|
1987
|
|
-
|
|
1971
|
+
|
1988
|
1972
|
#if TEMP_SENSOR_BED != 0
|
1989
|
1973
|
#undef THERMISTOR_ID
|
1990
|
1974
|
#define THERMISTOR_ID TEMP_SENSOR_BED
|
|
@@ -1998,7 +1982,7 @@ static void lcd_status_screen() {
|
1998
|
1982
|
|
1999
|
1983
|
/**
|
2000
|
1984
|
*
|
2001
|
|
- * Printer Info > Board Info
|
|
1985
|
+ * About Printer > Board Info
|
2002
|
1986
|
*
|
2003
|
1987
|
*/
|
2004
|
1988
|
static void lcd_info_board_menu() {
|
|
@@ -2019,23 +2003,34 @@ static void lcd_status_screen() {
|
2019
|
2003
|
|
2020
|
2004
|
/**
|
2021
|
2005
|
*
|
2022
|
|
- * "Printer Info" submenu
|
|
2006
|
+ * About Printer > Printer Info
|
2023
|
2007
|
*
|
2024
|
2008
|
*/
|
2025
|
|
- static void lcd_info_menu() {
|
|
2009
|
+ static void lcd_info_printer_menu() {
|
|
2010
|
+ if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
2026
|
2011
|
START_MENU();
|
2027
|
|
- MENU_ITEM(back, MSG_INFO_MENU);
|
2028
|
2012
|
STATIC_ITEM(MSG_MARLIN); // Marlin
|
2029
|
2013
|
STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch
|
2030
|
2014
|
STATIC_ITEM(STRING_DISTRIBUTION_DATE); // YYYY-MM-DD HH:MM
|
2031
|
2015
|
STATIC_ITEM(MACHINE_NAME); // My3DPrinter
|
2032
|
2016
|
STATIC_ITEM(WEBSITE_URL); // www.my3dprinter.com
|
2033
|
2017
|
STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS)); // Extruders: 2
|
|
2018
|
+ END_MENU();
|
|
2019
|
+ }
|
2034
|
2020
|
|
2035
|
|
- MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, lcd_info_board_menu); // Board Info ->
|
2036
|
|
- MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, lcd_info_thermistors_menu); // Thermistors ->
|
|
2021
|
+ /**
|
|
2022
|
+ *
|
|
2023
|
+ * "About Printer" submenu
|
|
2024
|
+ *
|
|
2025
|
+ */
|
|
2026
|
+ static void lcd_info_menu() {
|
|
2027
|
+ START_MENU();
|
|
2028
|
+ MENU_ITEM(back, MSG_MAIN);
|
|
2029
|
+ MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, lcd_info_printer_menu); // Printer Info >
|
|
2030
|
+ MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, lcd_info_board_menu); // Board Info >
|
|
2031
|
+ MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, lcd_info_thermistors_menu); // Thermistors >
|
2037
|
2032
|
#if ENABLED(PRINTCOUNTER)
|
2038
|
|
- MENU_ITEM(submenu, MSG_INFO_STATS_MENU, lcd_info_stats_menu); // Printer Statistics ->
|
|
2033
|
+ MENU_ITEM(submenu, MSG_INFO_STATS_MENU, lcd_info_stats_menu); // Printer Statistics >
|
2039
|
2034
|
#endif
|
2040
|
2035
|
END_MENU();
|
2041
|
2036
|
}
|
|
@@ -2744,7 +2739,6 @@ char *ftostr4sign(const float& x) { return itostr4sign((int)x); }
|
2744
|
2739
|
|
2745
|
2740
|
// Convert unsigned int to string with 12 format
|
2746
|
2741
|
char* itostr2(const uint8_t& x) {
|
2747
|
|
- //sprintf(conv,"%5.1f",x);
|
2748
|
2742
|
int xx = x;
|
2749
|
2743
|
conv[0] = DIGIMOD(xx / 10);
|
2750
|
2744
|
conv[1] = DIGIMOD(xx);
|