diff --git a/.travis.yml b/.travis.yml index 20a507510..03f7585d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,6 +126,7 @@ script: # - restore_configs - opt_enable AUTO_BED_LEVELING_UBL UBL_G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT FIX_MOUNTED_PROBE EEPROM_SETTINGS G3D_PANEL + - opt_enable_adv CUSTOM_USER_MENUS - build_marlin # # Test a Sled Z Probe diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index d593ed095..a23e90bc7 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1221,12 +1221,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1235,4 +1234,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index a8f4c3166..caba55f7e 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 3132bf9ff..6b5718d51 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h index 142cd1d24..013518b78 100644 --- a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h @@ -1227,12 +1227,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.5 @@ -1241,4 +1240,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 171ab3e4d..bcef1672e 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index fb7869435..cb227fd8f 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -1198,12 +1198,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1212,4 +1211,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 44aae82fa..692af7fab 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -1227,12 +1227,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1241,4 +1240,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index a04d83baf..7999653d2 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 3605da6a7..5f84cd820 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 6bfee737d..fa1c96532 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index 05caf958e..9a50d0971 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index 488da0e2b..0a498ac62 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -1217,12 +1217,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1231,4 +1230,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 171ab3e4d..bcef1672e 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index eb44f9e09..e60b421a9 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -1219,12 +1219,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1233,4 +1232,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 6eed64c6f..05aefb8ba 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -1218,12 +1218,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1232,4 +1231,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 6f45736b6..a37cc5572 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -1216,12 +1216,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1230,4 +1229,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 6f45736b6..a37cc5572 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -1216,12 +1216,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1230,4 +1229,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 8f7ae5496..0e428fe65 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -1221,12 +1221,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1235,4 +1234,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 779dbe9a9..99be30bf0 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -1216,12 +1216,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1230,4 +1229,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h index 71a3d90e0..c18723ee6 100644 --- a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h @@ -1223,12 +1223,11 @@ #define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.5 @@ -1237,4 +1236,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 9aa560794..f667868f1 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 660d479b5..3076378f9 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -1214,12 +1214,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1228,4 +1227,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index bf586bdba..1c0a28083 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -1217,12 +1217,11 @@ //#define NO_WORKSPACE_OFFSETS /** - * This affects the way Marlin outputs blacks of spaces via serial connection by multiplying the number - * of spaces to be output by the ratio set below. This allows for better alignment of output for commands - * like G29 O, which renders a mesh/grid. + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. * - * For clients that use a fixed-width font (like OctoPrint), leave this at 1.0; otherwise, adjust - * accordingly for your client and font. + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. */ #define PROPORTIONAL_FONT_RATIO 1.0 @@ -1231,4 +1230,27 @@ */ #define FASTER_GCODE_PARSER +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + #define USER_SCRIPT_DONE "M117 User Script Done" + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for PLA" + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for ABS" + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + //#define USER_DESC_5 "Home & Info" + //#define USER_GCODE_5 "G28\nM503" +#endif + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/language_en.h b/Marlin/language_en.h index 8de63f436..3190a12a5 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -156,6 +156,9 @@ #ifndef MSG_LEVEL_BED #define MSG_LEVEL_BED _UxGT("Level bed") #endif +#ifndef MSG_USER_MENU + #define MSG_USER_MENU _UxGT("Custom Commands") +#endif #if ENABLED(AUTO_BED_LEVELING_UBL) #ifndef MSG_UBL_UNHOMED diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index cd1701481..fb24ac3c2 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -789,6 +789,58 @@ void kill_screen(const char* lcd_msg) { #endif // HAS_DEBUG_MENU + #if ENABLED(CUSTOM_USER_MENUS) + + #ifdef USER_SCRIPT_DONE + #define _DONE_SCRIPT "\n" USER_SCRIPT_DONE + #else + #define _DONE_SCRIPT "" + #endif + + void _lcd_user_gcode(const char * const cmd) { + lcd_return_to_status(); + enqueue_and_echo_commands_P(cmd); + } + + #if defined(USER_DESC_1) && defined(USER_GCODE_1) + void lcd_user_gcode_1() { _lcd_user_gcode(PSTR(USER_GCODE_1 _DONE_SCRIPT)); } + #endif + #if defined(USER_DESC_2) && defined(USER_GCODE_2) + void lcd_user_gcode_2() { _lcd_user_gcode(PSTR(USER_GCODE_2 _DONE_SCRIPT)); } + #endif + #if defined(USER_DESC_3) && defined(USER_GCODE_3) + void lcd_user_gcode_3() { _lcd_user_gcode(PSTR(USER_GCODE_3 _DONE_SCRIPT)); } + #endif + #if defined(USER_DESC_4) && defined(USER_GCODE_4) + void lcd_user_gcode_4() { _lcd_user_gcode(PSTR(USER_GCODE_4 _DONE_SCRIPT)); } + #endif + #if defined(USER_DESC_5) && defined(USER_GCODE_5) + void lcd_user_gcode_5() { _lcd_user_gcode(PSTR(USER_GCODE_5 _DONE_SCRIPT)); } + #endif + + void _lcd_user_menu() { + START_MENU(); + MENU_BACK(MSG_MAIN); + #if defined(USER_DESC_1) && defined(USER_GCODE_1) + MENU_ITEM(function, USER_DESC_1, lcd_user_gcode_1); + #endif + #if defined(USER_DESC_2) && defined(USER_GCODE_2) + MENU_ITEM(function, USER_DESC_2, lcd_user_gcode_2); + #endif + #if defined(USER_DESC_3) && defined(USER_GCODE_3) + MENU_ITEM(function, USER_DESC_3, lcd_user_gcode_3); + #endif + #if defined(USER_DESC_4) && defined(USER_GCODE_4) + MENU_ITEM(function, USER_DESC_4, lcd_user_gcode_4); + #endif + #if defined(USER_DESC_5) && defined(USER_GCODE_5) + MENU_ITEM(function, USER_DESC_5, lcd_user_gcode_5); + #endif + END_MENU(); + } + + #endif + /** * * "Main" menu @@ -804,6 +856,10 @@ void kill_screen(const char* lcd_msg) { START_MENU(); MENU_BACK(MSG_WATCH); + #if ENABLED(CUSTOM_USER_MENUS) + MENU_ITEM(submenu, MSG_USER_MENU, _lcd_user_menu); + #endif + // // Debug Menu when certain options are enabled //