diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index baabbb50aa..25ec27a118 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index b52ff8d0c7..023df5baaa 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -473,6 +473,22 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) { u8g.setPrintPos((START_ROW) * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT)); } +static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, bool center=true) { + char c; + uint8_t n = LCD_WIDTH; + u8g.setPrintPos(0, (row + 1) * (DOG_CHAR_HEIGHT)); + u8g.setColorIndex(1); // normal text + if (center) { + int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2; + while (--pad >= 0) { lcd_print(' '); n--; } + } + while (c = pgm_read_byte(pstr)) { + n -= lcd_print(c); + pstr++; + } + while (n--) lcd_print(' '); +} + static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) { UNUSED(pstr); UNUSED(pre_char); diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index e7f4f10e83..8b48f00da3 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 8de3db946b..d514288d74 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 727fe6c0e6..b4062e8e66 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index 24aa11cdc1..d86b8c0e36 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 491a8d9238..ae64887421 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -370,6 +370,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 020804017b..7b608f80a8 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index d232c6bebd..58d36231b9 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index ca80621bab..11b9e6c1d1 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -372,6 +372,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 727fe6c0e6..b4062e8e66 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index 8e0653dbb2..1978c09277 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -366,6 +366,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index af10352282..f673a200ba 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -366,6 +366,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 94f6f134ae..93e9e30d6d 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -365,6 +365,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 7ed46feeb8..f417a57e45 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -370,6 +370,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 117a2ad318..bcbf1c1b12 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -366,6 +366,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 772f05e5eb..7b7b4f9b7d 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 78758bd79d..d58dbb37c1 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -364,6 +364,9 @@ // @section lcd +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/language_en.h b/Marlin/language_en.h index 8f20bc0306..165a15838f 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -520,5 +520,44 @@ #ifndef MSG_DELTA_CALIBRATE_CENTER #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #endif +#ifndef MSG_INFO_MENU + #define MSG_INFO_MENU "About Printer" +#endif +#ifndef MSG_INFO_STATS_MENU + #define MSG_INFO_STATS_MENU "Printer Stats" +#endif +#ifndef MSG_INFO_BOARD_MENU + #define MSG_INFO_BOARD_MENU "Board Info" +#endif +#ifndef MSG_INFO_THERMISTOR_MENU + #define MSG_INFO_THERMISTOR_MENU "Thermistors" +#endif +#ifndef MSG_INFO_EXTRUDERS + #define MSG_INFO_EXTRUDERS "Extruders" +#endif +#ifndef MSG_INFO_BAUDRATE + #define MSG_INFO_BAUDRATE "Baud" +#endif +#ifndef MSG_INFO_PROTOCOL + #define MSG_INFO_PROTOCOL "Protocol" +#endif +#ifndef MSG_INFO_TOTAL_PRINTS + #define MSG_INFO_TOTAL_PRINTS "Total Prints" +#endif +#ifndef MSG_INFO_FINISHED_PRINTS + #define MSG_INFO_FINISHED_PRINTS "Finished Prints" +#endif +#ifndef MSG_INFO_PRINT_TIME + #define MSG_INFO_PRINT_TIME "Total Print Time" +#endif +#ifndef MSG_INFO_MIN_TEMP + #define MSG_INFO_MIN_TEMP "Min Temp" +#endif +#ifndef MSG_INFO_MAX_TEMP + #define MSG_INFO_MAX_TEMP "Max Temp" +#endif +#ifndef MSG_INFO_PSU + #define MSG_INFO_PSU "Power Supply" +#endif #endif // LANGUAGE_EN_H diff --git a/Marlin/pins_3DRAG.h b/Marlin/pins_3DRAG.h index 9de52e3891..c04464b436 100644 --- a/Marlin/pins_3DRAG.h +++ b/Marlin/pins_3DRAG.h @@ -24,10 +24,19 @@ * 3DRAG (and K8200) Arduino Mega with RAMPS v1.4 pin assignments */ -#include "pins_RAMPS_14.h" +#ifndef BOARD_NAME + #define BOARD_NAME "3Drag" +#endif + +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "3Drag" +#endif -#define DEFAULT_MACHINE_NAME "3Drag" -#define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/" +#ifndef DEFAULT_SOURCE_CODE_URL + #define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/" +#endif + +#include "pins_RAMPS_14.h" #undef Z_ENABLE_PIN #define Z_ENABLE_PIN 63 diff --git a/Marlin/pins_5DPRINT.h b/Marlin/pins_5DPRINT.h index 1365cd4070..0674a98d1c 100644 --- a/Marlin/pins_5DPRINT.h +++ b/Marlin/pins_5DPRINT.h @@ -31,6 +31,7 @@ #endif #define DEFAULT_MACHINE_NAME "Makibox" +#define BOARD_NAME "5DPrint D8" #define LARGE_FLASH true diff --git a/Marlin/pins_99.h b/Marlin/pins_99.h index 8ae78b26eb..6b7d1e8911 100644 --- a/Marlin/pins_99.h +++ b/Marlin/pins_99.h @@ -23,7 +23,8 @@ /** * Board 99 pin assignments */ - +#define BOARD_NAME "99 Unknown" + #define X_STEP_PIN 2 #define X_DIR_PIN 3 #define X_ENABLE_PIN -1 diff --git a/Marlin/pins_A4JP.h b/Marlin/pins_A4JP.h index ca217414db..990abc3092 100644 --- a/Marlin/pins_A4JP.h +++ b/Marlin/pins_A4JP.h @@ -28,6 +28,8 @@ #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "AJ4P" + // Servo support #define SERVO0_PIN 22 // Motor header MX1 #define SERVO1_PIN 23 // Motor header MX2 diff --git a/Marlin/pins_AZTEEG_X1.h b/Marlin/pins_AZTEEG_X1.h index 21bb491f5b..8f87a7eaa7 100644 --- a/Marlin/pins_AZTEEG_X1.h +++ b/Marlin/pins_AZTEEG_X1.h @@ -24,6 +24,7 @@ * Azteeg X1 pin assignments */ -#define SANGUINOLOLU_V_1_2 +#define BOARD_NAME "Azteeg X1" +#define SANGUINOLOLU_V_1_2 #include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_AZTEEG_X3.h b/Marlin/pins_AZTEEG_X3.h index adc0332fb5..f16eee3103 100644 --- a/Marlin/pins_AZTEEG_X3.h +++ b/Marlin/pins_AZTEEG_X3.h @@ -24,6 +24,8 @@ * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments */ +#define BOARD_NAME "Azteeg X3" + #include "pins_RAMPS_14_EFB.h" #if ENABLED(VIKI2) || ENABLED(miniVIKI) diff --git a/Marlin/pins_AZTEEG_X3_PRO.h b/Marlin/pins_AZTEEG_X3_PRO.h index 58d979ab35..3331a299a0 100644 --- a/Marlin/pins_AZTEEG_X3_PRO.h +++ b/Marlin/pins_AZTEEG_X3_PRO.h @@ -24,6 +24,8 @@ * AZTEEG_X3_PRO (Arduino Mega) pin assignments */ +#define BOARD_NAME "Azteeg X3 Pro" + #include "pins_RAMPS_14.h" #undef FAN_PIN diff --git a/Marlin/pins_BAM_DICE_DUE.h b/Marlin/pins_BAM_DICE_DUE.h index 355daf5c1d..a8e76a7eff 100644 --- a/Marlin/pins_BAM_DICE_DUE.h +++ b/Marlin/pins_BAM_DICE_DUE.h @@ -24,6 +24,8 @@ * BAM&DICE Due (Arduino Mega) pin assignments */ +#define BOARD_NAME "2PrintBeta Due" + #include "pins_RAMPS_14_EFB.h" #undef TEMP_0_PIN diff --git a/Marlin/pins_BQ_ZUM_MEGA_3D.h b/Marlin/pins_BQ_ZUM_MEGA_3D.h index 13f81a9ced..c5509d4e5f 100644 --- a/Marlin/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/pins_BQ_ZUM_MEGA_3D.h @@ -28,6 +28,8 @@ #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "ZUM Mega 3D" + #include "pins_RAMPS_13.h" #undef X_MAX_PIN diff --git a/Marlin/pins_BRAINWAVE.h b/Marlin/pins_BRAINWAVE.h index 20713502fa..63e2d0bbc2 100644 --- a/Marlin/pins_BRAINWAVE.h +++ b/Marlin/pins_BRAINWAVE.h @@ -31,6 +31,8 @@ #error "Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Brainwave" + #define X_STEP_PIN 27 #define X_DIR_PIN 29 #define X_ENABLE_PIN 28 diff --git a/Marlin/pins_BRAINWAVE_PRO.h b/Marlin/pins_BRAINWAVE_PRO.h index 7961608abb..fc10c2977e 100644 --- a/Marlin/pins_BRAINWAVE_PRO.h +++ b/Marlin/pins_BRAINWAVE_PRO.h @@ -37,6 +37,8 @@ #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config" #endif +#define BOARD_NAME "Brainwave Pro" + #define LARGE_FLASH true #define X_STEP_PIN 33 diff --git a/Marlin/pins_CHEAPTRONIC.h b/Marlin/pins_CHEAPTRONIC.h index 8c5f900023..41e3dacb0e 100644 --- a/Marlin/pins_CHEAPTRONIC.h +++ b/Marlin/pins_CHEAPTRONIC.h @@ -28,6 +28,7 @@ #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Cheaptronic v1.0" #define LARGE_FLASH true // X motor stepper diff --git a/Marlin/pins_CNCONTROLS_12.h b/Marlin/pins_CNCONTROLS_12.h index 81e885eef2..f1de6c11a0 100644 --- a/Marlin/pins_CNCONTROLS_12.h +++ b/Marlin/pins_CNCONTROLS_12.h @@ -6,6 +6,8 @@ #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu. #endif +#define BOARD_NAME "CN Controls V12" + //#define LARGE_FLASH true #define X_ENABLE_PIN 26 diff --git a/Marlin/pins_ELEFU_3.h b/Marlin/pins_ELEFU_3.h index 3e4fcf3e6b..546b5a84e3 100644 --- a/Marlin/pins_ELEFU_3.h +++ b/Marlin/pins_ELEFU_3.h @@ -28,6 +28,8 @@ #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Elefu Ra v3" + #define X_STEP_PIN 49 #define X_DIR_PIN 13 #define X_ENABLE_PIN 48 diff --git a/Marlin/pins_FELIX2.h b/Marlin/pins_FELIX2.h index e5aa87922b..dfea48358f 100644 --- a/Marlin/pins_FELIX2.h +++ b/Marlin/pins_FELIX2.h @@ -24,6 +24,8 @@ * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments */ +#define BOARD_NAME "Felix 2.0+" + #include "pins_RAMPS_14_EFB.h" #undef HEATER_1_PIN diff --git a/Marlin/pins_GEN3_MONOLITHIC.h b/Marlin/pins_GEN3_MONOLITHIC.h index fb31a8bf18..85d5b3faef 100644 --- a/Marlin/pins_GEN3_MONOLITHIC.h +++ b/Marlin/pins_GEN3_MONOLITHIC.h @@ -28,6 +28,7 @@ #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Gen3 Monolithic" #define DEBUG_PIN 0 // x axis diff --git a/Marlin/pins_GEN3_PLUS.h b/Marlin/pins_GEN3_PLUS.h index a96b6b8da6..7889a0103e 100644 --- a/Marlin/pins_GEN3_PLUS.h +++ b/Marlin/pins_GEN3_PLUS.h @@ -28,6 +28,8 @@ #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Gen3+" + #define X_STEP_PIN 15 #define X_DIR_PIN 18 #define X_STOP_PIN 20 diff --git a/Marlin/pins_GEN6.h b/Marlin/pins_GEN6.h index f44c696d0f..ae3d33a9ad 100644 --- a/Marlin/pins_GEN6.h +++ b/Marlin/pins_GEN6.h @@ -30,6 +30,10 @@ #endif #endif +#ifndef BOARD_NAME + #define BOARD_NAME "Gen6" +#endif + //x axis pins #define X_STEP_PIN 15 #define X_DIR_PIN 18 diff --git a/Marlin/pins_GEN6_DELUXE.h b/Marlin/pins_GEN6_DELUXE.h index 718f517c6b..b1a1037ed9 100644 --- a/Marlin/pins_GEN6_DELUXE.h +++ b/Marlin/pins_GEN6_DELUXE.h @@ -24,4 +24,6 @@ * Gen6 Deluxe pin assignments */ +#define BOARD_NAME "Gen6 Deluxe" + #include "pins_GEN6.h" diff --git a/Marlin/pins_GEN7_12.h b/Marlin/pins_GEN7_12.h index 58fad2fe0f..1e59ae6fa9 100644 --- a/Marlin/pins_GEN7_12.h +++ b/Marlin/pins_GEN7_12.h @@ -28,6 +28,10 @@ #error "Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu." #endif +#ifndef BOARD_NAME + #define BOARD_NAME "Gen7 v1.1 / 1.2" +#endif + #ifndef GEN7_VERSION #define GEN7_VERSION 12 // v1.x #endif diff --git a/Marlin/pins_GEN7_13.h b/Marlin/pins_GEN7_13.h index 5887aeca8e..2365ae8be8 100644 --- a/Marlin/pins_GEN7_13.h +++ b/Marlin/pins_GEN7_13.h @@ -24,7 +24,7 @@ * Gen7 v1.3 pin assignments */ -#define MOTHERBOARD BOARD_GEN7_12 -#define GEN7_VERSION 13 // v1.3 +#define BOARD_NAME "Gen7 v1.3" +#define GEN7_VERSION 13 // v1.3 #include "pins_GEN7_12.h" diff --git a/Marlin/pins_GEN7_14.h b/Marlin/pins_GEN7_14.h index b85a09314e..87ccb60186 100644 --- a/Marlin/pins_GEN7_14.h +++ b/Marlin/pins_GEN7_14.h @@ -24,12 +24,14 @@ * Gen7 v1.4 pin assignments */ -#define GEN7_VERSION 14 // v1.4 - #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) #error "Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Gen7 v1.4" + +#define GEN7_VERSION 14 // v1.4 + //x axis pins #define X_STEP_PIN 29 #define X_DIR_PIN 28 diff --git a/Marlin/pins_GEN7_CUSTOM.h b/Marlin/pins_GEN7_CUSTOM.h index 11a0a44479..f740e4a012 100644 --- a/Marlin/pins_GEN7_CUSTOM.h +++ b/Marlin/pins_GEN7_CUSTOM.h @@ -31,6 +31,8 @@ #error "Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Gen7 Custom" + //x axis pins #define X_STEP_PIN 21 // different from standard GEN7 #define X_DIR_PIN 20 // different from standard GEN7 diff --git a/Marlin/pins_K8200.h b/Marlin/pins_K8200.h index ac65297eb8..cc3e731172 100644 --- a/Marlin/pins_K8200.h +++ b/Marlin/pins_K8200.h @@ -25,10 +25,8 @@ * Identical to 3DRAG */ -#include "pins_3DRAG.h" - -#undef DEFAULT_MACHINE_NAME +#define BOARD_NAME "Velleman K8200" #define DEFAULT_MACHINE_NAME "K8200" - -#undef DEFAULT_SOURCE_CODE_URL #define DEFAULT_SOURCE_CODE_URL "https://github.com/CONSULitAS/Marlin-K8200" + +#include "pins_3DRAG.h" diff --git a/Marlin/pins_LEAPFROG.h b/Marlin/pins_LEAPFROG.h index 5acad04799..acfba03731 100644 --- a/Marlin/pins_LEAPFROG.h +++ b/Marlin/pins_LEAPFROG.h @@ -28,6 +28,8 @@ #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Leapfrog" + #define X_STEP_PIN 28 #define X_DIR_PIN 63 #define X_ENABLE_PIN 29 diff --git a/Marlin/pins_MEGACONTROLLER.h b/Marlin/pins_MEGACONTROLLER.h index 8e423a3bcb..600f2f528d 100644 --- a/Marlin/pins_MEGACONTROLLER.h +++ b/Marlin/pins_MEGACONTROLLER.h @@ -32,6 +32,8 @@ #error "Mega Controller supports up to 2 extruders. Comment this line to keep going." #endif +#define BOARD_NAME "Mega Controller" + #define SERVO0_PIN 30 #define SERVO1_PIN 31 #define SERVO2_PIN 32 diff --git a/Marlin/pins_MEGATRONICS.h b/Marlin/pins_MEGATRONICS.h index b8022e642a..4e766d8b98 100644 --- a/Marlin/pins_MEGATRONICS.h +++ b/Marlin/pins_MEGATRONICS.h @@ -28,6 +28,7 @@ #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Megatronics" #define LARGE_FLASH true #define X_STEP_PIN 26 diff --git a/Marlin/pins_MEGATRONICS_2.h b/Marlin/pins_MEGATRONICS_2.h index 6fb3475520..90e9b1feef 100644 --- a/Marlin/pins_MEGATRONICS_2.h +++ b/Marlin/pins_MEGATRONICS_2.h @@ -28,6 +28,7 @@ #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Megatronics v2.0" #define LARGE_FLASH true #define X_STEP_PIN 26 diff --git a/Marlin/pins_MEGATRONICS_3.h b/Marlin/pins_MEGATRONICS_3.h index 8410ce0617..47ec17649f 100644 --- a/Marlin/pins_MEGATRONICS_3.h +++ b/Marlin/pins_MEGATRONICS_3.h @@ -28,6 +28,7 @@ #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Megatronics v3.0" #define LARGE_FLASH true #if ENABLED(Z_PROBE_SLED) diff --git a/Marlin/pins_MELZI.h b/Marlin/pins_MELZI.h index dae033bf89..677f0cf360 100644 --- a/Marlin/pins_MELZI.h +++ b/Marlin/pins_MELZI.h @@ -24,10 +24,11 @@ * Melzi pin assignments */ -#define SANGUINOLOLU_V_1_2 +#define BOARD_NAME "Melzi" #if defined(__AVR_ATmega1284P__) #define LARGE_FLASH true #endif +#define SANGUINOLOLU_V_1_2 #include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_MELZI_MAKR3D.h b/Marlin/pins_MELZI_MAKR3D.h index fe77e27bc9..877f8cbd23 100644 --- a/Marlin/pins_MELZI_MAKR3D.h +++ b/Marlin/pins_MELZI_MAKR3D.h @@ -24,12 +24,11 @@ * Melzi with ATmega1284 (MaKr3d version) pin assignments */ -#undef MOTHERBOARD -#define MOTHERBOARD BOARD_MELZI -#define SANGUINOLOLU_V_1_2 +#define BOARD_NAME "Melzi ATmega1284" #if defined(__AVR_ATmega1284P__) #define LARGE_FLASH true #endif +#define SANGUINOLOLU_V_1_2 #include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_MINIRAMBO.h b/Marlin/pins_MINIRAMBO.h index 29bc9dfb53..089ea59963 100644 --- a/Marlin/pins_MINIRAMBO.h +++ b/Marlin/pins_MINIRAMBO.h @@ -28,6 +28,7 @@ #error "Oops! Make sure you have 'Arduino Mega 2560 or Rambo' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Mini Rambo" #define LARGE_FLASH true #define X_STEP_PIN 37 diff --git a/Marlin/pins_MINITRONICS.h b/Marlin/pins_MINITRONICS.h index e21993fffd..0c80ceda45 100644 --- a/Marlin/pins_MINITRONICS.h +++ b/Marlin/pins_MINITRONICS.h @@ -28,6 +28,7 @@ #error "Oops! Make sure you have 'Minitronics' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Minitronics v1.0 / v1.1" #define LARGE_FLASH true #define X_STEP_PIN 48 diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_13.h index 346a43e293..1b25653372 100644 --- a/Marlin/pins_MKS_13.h +++ b/Marlin/pins_MKS_13.h @@ -29,6 +29,8 @@ * MKS v1.4 (Extruder, Extruder, Fan, Bed) */ +#define BOARD_NAME "MKS > v1.3" + #include "pins_RAMPS_14_EFB.h" #undef HEATER_1_PIN diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h index 5ca8e05b92..3c721f5ff8 100644 --- a/Marlin/pins_MKS_BASE.h +++ b/Marlin/pins_MKS_BASE.h @@ -24,6 +24,8 @@ * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments */ +#define BOARD_NAME "MKS BASE 1.0" + #include "pins_RAMPS_14_EFB.h" #undef HEATER_1_PIN diff --git a/Marlin/pins_OMCA.h b/Marlin/pins_OMCA.h index 261e64549f..9ec6309d57 100644 --- a/Marlin/pins_OMCA.h +++ b/Marlin/pins_OMCA.h @@ -55,6 +55,8 @@ #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)" #endif +#define BOARD_NAME "Final OMCA" + #define X_STEP_PIN 26 #define X_DIR_PIN 25 #define X_ENABLE_PIN 10 diff --git a/Marlin/pins_OMCA_A.h b/Marlin/pins_OMCA_A.h index 1b82c5c463..39d232aee2 100644 --- a/Marlin/pins_OMCA_A.h +++ b/Marlin/pins_OMCA_A.h @@ -54,6 +54,8 @@ #error "Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Alpha OMCA" + #define X_STEP_PIN 21 #define X_DIR_PIN 20 #define X_ENABLE_PIN 24 diff --git a/Marlin/pins_PRINTRBOARD.h b/Marlin/pins_PRINTRBOARD.h index 91455a615e..eaccabe9db 100644 --- a/Marlin/pins_PRINTRBOARD.h +++ b/Marlin/pins_PRINTRBOARD.h @@ -35,6 +35,7 @@ #error "These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h" #endif +#define BOARD_NAME "Printrboard" #define LARGE_FLASH true // Disable JTAG pins so they can be used for the Extrudrboard diff --git a/Marlin/pins_PRINTRBOARD_REVF.h b/Marlin/pins_PRINTRBOARD_REVF.h index 799eb37c63..d2a45623a2 100644 --- a/Marlin/pins_PRINTRBOARD_REVF.h +++ b/Marlin/pins_PRINTRBOARD_REVF.h @@ -35,6 +35,7 @@ #error "These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h" #endif +#define BOARD_NAME "Printrboard Rev F" #define LARGE_FLASH true #define X_STEP_PIN 0 diff --git a/Marlin/pins_RAMBO.h b/Marlin/pins_RAMBO.h index 0e7c7aadee..68c627b908 100644 --- a/Marlin/pins_RAMBO.h +++ b/Marlin/pins_RAMBO.h @@ -28,6 +28,8 @@ #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Rambo" + #define LARGE_FLASH true // Servo support diff --git a/Marlin/pins_RAMPS_13.h b/Marlin/pins_RAMPS_13.h index 5655f35a14..e3a854b117 100644 --- a/Marlin/pins_RAMPS_13.h +++ b/Marlin/pins_RAMPS_13.h @@ -33,6 +33,9 @@ * */ -#define IS_RAMPS_13 +#ifndef BOARD_NAME + #define BOARD_NAME "RAMPS 1.3" +#endif +#define IS_RAMPS_13 #include "pins_RAMPS_14.h" diff --git a/Marlin/pins_RAMPS_13_EFB.h b/Marlin/pins_RAMPS_13_EFB.h index e0bea37e7f..80e2927293 100644 --- a/Marlin/pins_RAMPS_13_EFB.h +++ b/Marlin/pins_RAMPS_13_EFB.h @@ -26,6 +26,7 @@ * RAMPS_13_EFB (Extruder, Fan, Bed) */ -#define IS_RAMPS_13 +#define BOARD_NAME "RAMPS 1.3 EFB" +#define IS_RAMPS_13 #include "pins_RAMPS_14_EFB.h" diff --git a/Marlin/pins_RAMPS_14.h b/Marlin/pins_RAMPS_14.h index e860585e3c..0a63c2495a 100644 --- a/Marlin/pins_RAMPS_14.h +++ b/Marlin/pins_RAMPS_14.h @@ -48,6 +48,10 @@ #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif +#ifndef BOARD_NAME + #define BOARD_NAME "RAMPS 1.4" +#endif + #define LARGE_FLASH true #ifdef IS_RAMPS_13 diff --git a/Marlin/pins_RAMPS_14_EFB.h b/Marlin/pins_RAMPS_14_EFB.h index a43e4d2278..b7282ea561 100644 --- a/Marlin/pins_RAMPS_14_EFB.h +++ b/Marlin/pins_RAMPS_14_EFB.h @@ -26,6 +26,9 @@ * RAMPS_14_EFB (Extruder, Fan, Bed) */ -#define IS_RAMPS_EFB +#ifndef BOARD_NAME + #define BOARD_NAME "RAMPS 1.4 EFB" +#endif +#define IS_RAMPS_EFB #include "pins_RAMPS_14.h" diff --git a/Marlin/pins_RAMPS_OLD.h b/Marlin/pins_RAMPS_OLD.h index e731d65c4c..470071a2fa 100644 --- a/Marlin/pins_RAMPS_OLD.h +++ b/Marlin/pins_RAMPS_OLD.h @@ -28,6 +28,8 @@ #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "MEGA/RAMPS <1.2" + // Uncomment the following line for RAMPS v1.0 //#define RAMPS_V_1_0 diff --git a/Marlin/pins_RIGIDBOARD.h b/Marlin/pins_RIGIDBOARD.h index 69ce67d87f..7fdc1ae304 100644 --- a/Marlin/pins_RIGIDBOARD.h +++ b/Marlin/pins_RIGIDBOARD.h @@ -26,6 +26,9 @@ #include "pins_RAMPS_14.h" +#undef BOARD_NAME +#define BOARD_NAME "RigidBoard" + #if ENABLED(Z_MIN_PROBE_ENDSTOP) #undef Z_MAX_PIN #define Z_MAX_PIN -1 diff --git a/Marlin/pins_RIGIDBOARD_V2.h b/Marlin/pins_RIGIDBOARD_V2.h index 1226c56de9..7aad12e9ac 100644 --- a/Marlin/pins_RIGIDBOARD_V2.h +++ b/Marlin/pins_RIGIDBOARD_V2.h @@ -26,6 +26,9 @@ #include "pins_RIGIDBOARD.h" +#undef BOARD_NAME +#define BOARD_NAME "RigidBoard V2" + // I2C based DAC like on the Printrboard REVF #define DAC_STEPPER_CURRENT // Channels available for DAC, For Rigidboard there are 4 diff --git a/Marlin/pins_RUMBA.h b/Marlin/pins_RUMBA.h index 91f631d381..a0fe01360e 100644 --- a/Marlin/pins_RUMBA.h +++ b/Marlin/pins_RUMBA.h @@ -33,6 +33,7 @@ #endif #define DEFAULT_MACHINE_NAME "Rumba" +#define BOARD_NAME "Rumba" #define X_STEP_PIN 17 #define X_DIR_PIN 16 diff --git a/Marlin/pins_SAINSMART_2IN1.h b/Marlin/pins_SAINSMART_2IN1.h index 518cf501e2..3664fbd3a4 100644 --- a/Marlin/pins_SAINSMART_2IN1.h +++ b/Marlin/pins_SAINSMART_2IN1.h @@ -26,6 +26,9 @@ #include "pins_RAMPS_14_EFB.h" +#undef BOARD_NAME +#define BOARD_NAME "Sainsmart" + #undef FAN_PIN #define FAN_PIN 7 // PART FAN in front of board next to Extruder heat diff --git a/Marlin/pins_SANGUINOLOLU_11.h b/Marlin/pins_SANGUINOLOLU_11.h index 9b00788c30..a6220c596a 100644 --- a/Marlin/pins_SANGUINOLOLU_11.h +++ b/Marlin/pins_SANGUINOLOLU_11.h @@ -28,6 +28,12 @@ #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." #endif +#ifndef BOARD_NAME + #define BOARD_NAME "Sanguinololu <1.2" +#endif + +#define IS_MELZI (MB(MELZI) || MB(MELZI_MAKR3D)) + #define X_STEP_PIN 15 #define X_DIR_PIN 21 #define X_STOP_PIN 18 @@ -43,11 +49,11 @@ #define E0_STEP_PIN 1 #define E0_DIR_PIN 0 -#if MB(AZTEEG_X1) || MB(STB_11) || MB(MELZI) +#if MB(AZTEEG_X1) || MB(STB_11) || IS_MELZI #define FAN_PIN 4 // Works for Panelolu2 too #endif -#if MB(MELZI) +#if IS_MELZI #define LED_PIN 27 // On some broken versions of the Sanguino libraries the pin definitions are wrong, so LED_PIN needs to be 28. But you should upgrade your Sanguino libraries! See #368. #elif MB(STB_11) #define LCD_PIN_BL 17 // LCD backlight LED @@ -101,7 +107,7 @@ #if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 - #if MB(MELZI) // Melzi board + #if IS_MELZI // Melzi board #define LCD_PINS_RS 30 //CS chip select /SS chip slave select #define LCD_PINS_ENABLE 29 //SID (MOSI) #define LCD_PINS_D4 17 //SCK (CLK) clock @@ -147,7 +153,7 @@ #define BTN_EN1 11 #define BTN_EN2 10 #if ENABLED(LCD_I2C_PANELOLU2) - #if MB(MELZI) + #if IS_MELZI #define BTN_ENC 29 #define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi #else diff --git a/Marlin/pins_SANGUINOLOLU_12.h b/Marlin/pins_SANGUINOLOLU_12.h index 84d86275e9..f214d6f021 100644 --- a/Marlin/pins_SANGUINOLOLU_12.h +++ b/Marlin/pins_SANGUINOLOLU_12.h @@ -32,10 +32,11 @@ * STB_11 */ -#define SANGUINOLOLU_V_1_2 +#define BOARD_NAME "Sanguinololu 1.2" #if defined(__AVR_ATmega1284P__) #define LARGE_FLASH true #endif +#define SANGUINOLOLU_V_1_2 #include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_SAV_MKI.h b/Marlin/pins_SAV_MKI.h index b6f4504bab..97189bf778 100644 --- a/Marlin/pins_SAV_MKI.h +++ b/Marlin/pins_SAV_MKI.h @@ -33,6 +33,7 @@ #define DEFAULT_MACHINE_NAME "SAV MkI" #define DEFAULT_SOURCE_CODE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config" +#define BOARD_NAME "SAV MkI" #define LARGE_FLASH true diff --git a/Marlin/pins_SETHI.h b/Marlin/pins_SETHI.h index a3e01e2826..ff154acf54 100644 --- a/Marlin/pins_SETHI.h +++ b/Marlin/pins_SETHI.h @@ -28,6 +28,8 @@ #error "Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu." #endif +#define BOARD_NAME "Sethi 3D_1" + #ifndef GEN7_VERSION #define GEN7_VERSION 12 // v1.x #endif diff --git a/Marlin/pins_STB_11.h b/Marlin/pins_STB_11.h index 9ca93a3f70..318dc39c0b 100644 --- a/Marlin/pins_STB_11.h +++ b/Marlin/pins_STB_11.h @@ -24,10 +24,11 @@ * STB V1.1 pin assignments */ -#define SANGUINOLOLU_V_1_2 +#define BOARD_NAME "STB V1.1" #if defined(__AVR_ATmega1284P__) #define LARGE_FLASH true #endif +#define SANGUINOLOLU_V_1_2 #include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_TEENSY2.h b/Marlin/pins_TEENSY2.h index 1fe1342c5e..0f83117f28 100644 --- a/Marlin/pins_TEENSY2.h +++ b/Marlin/pins_TEENSY2.h @@ -74,6 +74,8 @@ // (or build from command line) #endif +#define BOARD_NAME "Teensy++2.0" + #define LARGE_FLASH true #define X_STEP_PIN 28 // 0 Marlin diff --git a/Marlin/pins_TEENSYLU.h b/Marlin/pins_TEENSYLU.h index 047d803f49..a19ef038b5 100644 --- a/Marlin/pins_TEENSYLU.h +++ b/Marlin/pins_TEENSYLU.h @@ -35,6 +35,8 @@ #error "These Teensylu assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h" #endif +#define BOARD_NAME "Teensylu" + #define LARGE_FLASH true #define X_STEP_PIN 0 diff --git a/Marlin/pins_ULTIMAIN_2.h b/Marlin/pins_ULTIMAIN_2.h index 792e62117d..c348ebb490 100644 --- a/Marlin/pins_ULTIMAIN_2.h +++ b/Marlin/pins_ULTIMAIN_2.h @@ -30,6 +30,7 @@ #define DEFAULT_MACHINE_NAME "Ultimaker" #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin" +#define BOARD_NAME "Ultimaker 2.x" #define X_STEP_PIN 25 #define X_DIR_PIN 23 diff --git a/Marlin/pins_ULTIMAKER.h b/Marlin/pins_ULTIMAKER.h index aab43ecb00..d770f3a612 100644 --- a/Marlin/pins_ULTIMAKER.h +++ b/Marlin/pins_ULTIMAKER.h @@ -30,6 +30,7 @@ #define DEFAULT_MACHINE_NAME "Ultimaker" #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin" +#define BOARD_NAME "Ultimaker" #define LARGE_FLASH true diff --git a/Marlin/pins_ULTIMAKER_OLD.h b/Marlin/pins_ULTIMAKER_OLD.h index b13e1f5724..33bc26c9aa 100644 --- a/Marlin/pins_ULTIMAKER_OLD.h +++ b/Marlin/pins_ULTIMAKER_OLD.h @@ -30,6 +30,7 @@ #define DEFAULT_MACHINE_NAME "Ultimaker" #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin" +#define BOARD_NAME "Ultimaker <1.5.4" #define LARGE_FLASH true diff --git a/Marlin/printcounter.h b/Marlin/printcounter.h index dbee3f9e6d..d6ac80b770 100644 --- a/Marlin/printcounter.h +++ b/Marlin/printcounter.h @@ -131,6 +131,12 @@ class PrintCounter: public Stopwatch { */ void showStats(); + /** + * @brief Return the currently loaded statistics + * @details Return the raw data, in the same structure used internally + */ + printStatistics getStats() { return this->data; } + /** * @brief Loop function * @details This function should be called at loop, it will take care of diff --git a/Marlin/thermistornames.h b/Marlin/thermistornames.h new file mode 100644 index 0000000000..4ad13f86b5 --- /dev/null +++ b/Marlin/thermistornames.h @@ -0,0 +1,91 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#undef THERMISTOR_NAME + +// Thermcouples +#if THERMISTOR_ID == -3 + #define THERMISTOR_NAME "MAX31855" +#elif THERMISTOR_ID == -2 + #define THERMISTOR_NAME "MAX6675" +#elif THERMISTOR_ID == -1 + #define THERMISTOR_NAME "AD595" + +// Standard thermistors +#elif THERMISTOR_ID == 1 + #define THERMISTOR_NAME "EPCOS 100K" +#elif THERMISTOR_ID == 2 + #define THERMISTOR_NAME "ATC 204GT-2" +#elif THERMISTOR_ID == 3 + #define THERMISTOR_NAME "Mendel-parts" +#elif THERMISTOR_ID == 4 + #define THERMISTOR_NAME "Generic 10K" +#elif THERMISTOR_ID == 5 + #define THERMISTOR_NAME "ATC 104GT-2" +#elif THERMISTOR_ID == 6 + #define THERMISTOR_NAME "EPCOS (alt)" +#elif THERMISTOR_ID == 7 + #define THERMISTOR_NAME "HW 104LAG" +#elif THERMISTOR_ID == 71 + #define THERMISTOR_NAME "HW 104LAF" +#elif THERMISTOR_ID == 8 + #define THERMISTOR_NAME "E3104FXT" +#elif THERMISTOR_ID == 9 + #define THERMISTOR_NAME "GE AL03006" +#elif THERMISTOR_ID == 10 + #define THERMISTOR_NAME "RS 198-961" +#elif THERMISTOR_ID == 11 + #define THERMISTOR_NAME "1% beta 3950" +#elif THERMISTOR_ID == 12 + #define THERMISTOR_NAME "E3104FXT (alt)" +#elif THERMISTOR_ID == 13 + #define THERMISTOR_NAME "Hisens 3950" +#elif THERMISTOR_ID == 20 + #define THERMISTOR_NAME "PT100 UltiMB" +#elif THERMISTOR_ID == 60 + #define THERMISTOR_NAME "Makers Tool" +#elif THERMISTOR_ID == 70 + #define THERMISTOR_NAME "Hephestos 2" + +// Modified thermistors +#elif THERMISTOR_ID == 51 + #define THERMISTOR_NAME "EPCOS 1K" +#elif THERMISTOR_ID == 52 + #define THERMISTOR_NAME "ATC204GT-2 1K" +#elif THERMISTOR_ID == 55 + #define THERMISTOR_NAME "ATC104GT-2 1K" +#elif THERMISTOR_ID == 1047 + #define THERMISTOR_NAME "PT1000 4K7" +#elif THERMISTOR_ID == 1010 + #define THERMISTOR_NAME "PT1000 1K" +#elif THERMISTOR_ID == 147 + #define THERMISTOR_NAME "PT100 4K7" +#elif THERMISTOR_ID == 110 + #define THERMISTOR_NAME "PT100 1K" + +// Dummies for dev testing +#elif THERMISTOR_ID == 998 + #define THERMISTOR_NAME "Dummy 1" +#elif THERMISTOR_ID == 999 + #define THERMISTOR_NAME "Dummy 2" + +#endif // THERMISTOR_ID diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 7fd0e9f256..8d52cc2f1e 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -29,6 +29,10 @@ #include "stepper.h" #include "configuration_store.h" +#if ENABLED(PRINTCOUNTER) + #include "printcounter.h" +#endif + int plaPreheatHotendTemp; int plaPreheatHPBTemp; int plaPreheatFanSpeed; @@ -117,6 +121,15 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to static void lcd_control_motion_menu(); static void lcd_control_volumetric_menu(); + #if ENABLED(LCD_INFO_MENU) + #if ENABLED(PRINTCOUNTER) + static void lcd_info_stats_menu(); + #endif + static void lcd_info_thermistors_menu(); + static void lcd_info_board_menu(); + static void lcd_info_menu(); + #endif + #if HAS_LCD_CONTRAST static void lcd_set_contrast(); #endif @@ -189,6 +202,12 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to /** * START_MENU generates the init code for a menu function + * + * encoderLine is the position based on the encoder + * currentMenuViewOffset is the top menu line to display + * _drawLineNr is the index of the LCD line (0-3) + * _lineNr is the menu item to draw and process + * _menuItemNr is the index of each MENU_ITEM */ #define START_MENU() do { \ ENCODER_DIRECTION_MENUS(); \ @@ -242,6 +261,26 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to _MENU_ITEM_PART_2(type, ## args); \ } while(0) + // Used to print static text with no visible cursor. + #define STATIC_ITEM(label, args...) \ + if (_menuItemNr == _lineNr) { \ + if (encoderLine == _menuItemNr && _menuItemNr < LCD_HEIGHT - 1) \ + encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \ + if (lcdDrawUpdate) \ + lcd_implementation_drawmenu_static(_drawLineNr, PSTR(label), ## args); \ + } \ + _menuItemNr++ + + // Same as STATIC_ITEM, but can display variables. Do not use for text strings. + #define STATIC_ITEM_VAR(label, args...) \ + if (_menuItemNr == _lineNr) { \ + if (encoderLine == _menuItemNr && _menuItemNr < LCD_HEIGHT - 1) \ + encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \ + if (lcdDrawUpdate) \ + lcd_implementation_drawmenu_static(_drawLineNr, label, ## args); \ + } \ + _menuItemNr++ + #if ENABLED(ENCODER_RATE_MULTIPLIER) //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value @@ -554,6 +593,10 @@ static void lcd_status_screen() { } #endif //SDSUPPORT + #if ENABLED(LCD_INFO_MENU) + MENU_ITEM(submenu, MSG_INFO_MENU, lcd_info_menu); + #endif + END_MENU(); } @@ -1870,6 +1913,134 @@ static void lcd_status_screen() { #endif //SDSUPPORT + #if ENABLED(LCD_INFO_MENU) + #if ENABLED(PRINTCOUNTER) + /** + * + * Printer Info > Stastics submenu + * + */ + static void lcd_info_stats_menu() { + PrintCounter print_job_counter = PrintCounter(); + print_job_counter.loadStats(); + printStatistics stats = print_job_counter.getStats(); + + char totalPrints[18]; + itoa(stats.totalPrints, totalPrints, 10); + char finishedPrints[18]; + itoa(stats.finishedPrints, finishedPrints, 10); + char printTime[18]; + itoa(stats.printTime, printTime, 10); + + if (LCD_CLICKED) lcd_goto_previous_menu(true); + START_MENU(); + STATIC_ITEM(MSG_INFO_TOTAL_PRINTS ": "); // Total Prints: + STATIC_ITEM_VAR(totalPrints); // 999 + STATIC_ITEM(MSG_INFO_FINISHED_PRINTS ": "); // Finished Prints: + STATIC_ITEM_VAR(finishedPrints); // 666 + STATIC_ITEM(MSG_INFO_PRINT_TIME ": "); // Total Print Time: + STATIC_ITEM_VAR(printTime); // 123456 + END_MENU(); + } + #endif + + /** + * + * Printer Info > Thermistors + * + */ + static void lcd_info_thermistors_menu() { + if (LCD_CLICKED) lcd_goto_previous_menu(true); + START_MENU(); + #define THERMISTOR_ID TEMP_SENSOR_0 + #include "thermistornames.h" + STATIC_ITEM("T0: " THERMISTOR_NAME); + STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_0_MINTEMP)); + STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_0_MAXTEMP)); + + #if TEMP_SENSOR_1 != 0 + #undef THERMISTOR_ID + #define THERMISTOR_ID TEMP_SENSOR_1 + #include "thermistornames.h" + STATIC_ITEM("T1: " THERMISTOR_NAME); + STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_1_MINTEMP)); + STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_1_MAXTEMP)); + #endif + + #if TEMP_SENSOR_2 != 0 + #undef THERMISTOR_ID + #define THERMISTOR_ID TEMP_SENSOR_2 + #include "thermistornames.h" + STATIC_ITEM("T2: " THERMISTOR_NAME); + STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_2_MINTEMP)); + STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_2_MAXTEMP)); + #endif + + #if TEMP_SENSOR_3 != 0 + #undef THERMISTOR_ID + #define THERMISTOR_ID TEMP_SENSOR_3 + #include "thermistornames.h" + STATIC_ITEM("T3: " THERMISTOR_NAME); + STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_3_MINTEMP)); + STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_3_MAXTEMP)); + #endif + + #if TEMP_SENSOR_BED != 0 + #undef THERMISTOR_ID + #define THERMISTOR_ID TEMP_SENSOR_BED + #include "thermistornames.h" + STATIC_ITEM("TBed:" THERMISTOR_NAME); + STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(BED_MINTEMP)); + STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(BED_MAXTEMP)); + #endif + END_MENU(); + } + + /** + * + * Printer Info > Board Info + * + */ + static void lcd_info_board_menu() { + if (LCD_CLICKED) lcd_goto_previous_menu(true); + START_MENU(); + STATIC_ITEM(BOARD_NAME); // MyPrinterController + STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE)); // Baud: 250000 + STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION); // Protocol: 1.0 + #ifdef POWER_SUPPLY + #if (POWER_SUPPLY == 1) + STATIC_ITEM(MSG_INFO_PSU ": ATX"); // Power Supply: ATX + #elif (POWER_SUPPLY == 2) + STATIC_ITEM(MSG_INFO_PSU ": XBox"); // Power Supply: XBox + #endif + #endif // POWER_SUPPLY + END_MENU(); + } + + /** + * + * "Printer Info" submenu + * + */ + static void lcd_info_menu() { + START_MENU(); + MENU_ITEM(back, MSG_INFO_MENU); + STATIC_ITEM(MSG_MARLIN); // Marlin + STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch + STATIC_ITEM(STRING_DISTRIBUTION_DATE); // YYYY-MM-DD HH:MM + STATIC_ITEM(MACHINE_NAME); // My3DPrinter + STATIC_ITEM(WEBSITE_URL); // www.my3dprinter.com + STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS)); // Extruders: 2 + + MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, lcd_info_board_menu); // Board Info -> + MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, lcd_info_thermistors_menu); // Thermistors -> + #if ENABLED(PRINTCOUNTER) + MENU_ITEM(submenu, MSG_INFO_STATS_MENU, lcd_info_stats_menu); // Printer Statistics -> + #endif + END_MENU(); + } + #endif // LCD_INFO_MENU + /** * * Functions for editing single values diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 24b68830d9..cc1803d969 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -815,6 +815,21 @@ static void lcd_implementation_status_screen() { lcd_print(lcd_status_message); } +static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, bool center=true) { + char c; + uint8_t n = LCD_WIDTH; + lcd.setCursor(0, row); + if (center) { + int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2; + while (--pad >= 0) { lcd.print(' '); n--; } + } + while ((c = pgm_read_byte(pstr)) && n > 0) { + n -= lcd_print(c); + pstr++; + } + while (n--) lcd.print(' '); +} + static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) { char c; uint8_t n = LCD_WIDTH - 2;