diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 14c0fd8208e3a714a36dbe413fe5a1bbe21e599b..9e2dddb3ae129a85ab149a00b903b4946fa7bddf 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 14c0fd8208e3a714a36dbe413fe5a1bbe21e599b..9e2dddb3ae129a85ab149a00b903b4946fa7bddf 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index d190904f12037ab446e3f302c36b472c94020b71..be772229715123205e00d30cc0c30087be632b27 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 209311e2c12202d33ee9cf9ba93942bc525684e9..164a6e7e4f741ff72c77146e0fb8916af5e9911d 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 70675f3558b6b9bb764bf22f6a58dc7c14af1711..09d83ea7b8f40fe752875a3199fd7062a9f85210 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index f045bdd4cbdc107b760f92d6bda0aa2f58a0f272..cf2fa49203c67bb02023e8ae6566277239db012e 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index ce8b341bec2099bb7798773806b763d00b6c87d9..c49334d13af293a7c223ab09eecfb7c46bdad275 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -559,11 +559,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index f045bdd4cbdc107b760f92d6bda0aa2f58a0f272..cf2fa49203c67bb02023e8ae6566277239db012e 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 31ad3fac3963e4e6cd4500b1e424889a9a890170..360065def9cf8318cd0166ffa981a4cce6905e0c 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index dda5ec98661f0272863b37894e84b3579020d880..4ce6c5f88f2613cd40e00a421b13caf85016a4e8 100644 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 30c41ebd0793e96b8c1acc6f8db242befca24d48..94a5da93945bb0430d5c31d6eeabf1233bbb3333 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h similarity index 100% rename from Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h rename to Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h similarity index 98% rename from Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h rename to Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 8c84c683fcb792bf6d2521e049d82c315fe52317..8ed11fc895988ef672793ed6ac8f2b704b41022b 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 6c7f2c3d202547d918244f70a9090f40a18697a5..aab33e753ca411a8a4fff36a62218c96a0a16fc7 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 764b58e361af078438faa4f898840f557c2640dd..6a4f21d04de4a4beb08bb38bd626af628473ab10 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -556,14 +556,22 @@ // This allows hosts to request long names for files and folders with M33 #define LONG_FILENAME_HOST_SUPPORT - // Enable this option to scroll long filenames in the SD card menu - //#define SCROLL_LONG_FILENAMES - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index e4f77d30700ec375732a66f8ec97f77d36a46105..632dfa9150c69a362f716a63f3db4dbf560790c0 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -563,11 +563,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index fae5ea1ccfae6e0a8a9af1bb770865b5a8b58201..744543d1fe112fb5dd10c89a1dfc37468f61c68a 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 5ad95c98ccc0e87034990c7441e4ce215c03f228..9ab2502283576578d108b4c7c130d00690ed6ee5 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index de89cc7e57fb7bdc7510820855582330b3d1beed..feba2005edee0084bf73aea1b8f464418433f46e 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 2ecd9ef447bb346e7506315e74fa795b121b50a9..8b7d1e2048ff583ae935c5aa6a411abc364f168a 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -551,11 +551,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index f75e352137220d3ca0ef8ce55150248086403c45..ef4c53e7e3d111b1a8a9518f14d0262e106c4a52 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index d63595d1a3631d86b4e1613e8cb48a6ca4565abb..1bce3c83fedcd60dbb4f184beb1b219a0d341945 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -570,11 +570,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 6428a2119461c28703ef43aca4c036d1bd10b4fe..7c6f9b05eb7b854404b4f95fed4ec1b668e1bd79 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 6a6379658a1cc0c42a2759cdb392b50f75b2e5fc..8d200148240eecaea800261ef208033be34a3408 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -564,11 +564,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 04ae683d0db6ac7d553594b4442dc3be695d24c1..10c4067064ba91604dfd08f1c8206201ff878c8b 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -564,11 +564,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 04ae683d0db6ac7d553594b4442dc3be695d24c1..10c4067064ba91604dfd08f1c8206201ff878c8b 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -564,11 +564,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 04ae683d0db6ac7d553594b4442dc3be695d24c1..10c4067064ba91604dfd08f1c8206201ff878c8b 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -564,11 +564,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index 75a918e6473e3a4f3b6c70adee85730313f3213b..1b77319fd89eb21d22e28ddd63a86c30bfe01ada 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -569,11 +569,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index aa05d414fc0ed9fb039e619df43b4526767e8d18..05483bee876a57f7b22d26e77c009ad16bd053e0 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -564,11 +564,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 54ae9d1c92371054ea260663758a10ca88bd8c94..80984026047f53eb9f6e64b8e96c79336ca0e34c 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 68782035ae623d1ac2b1eb9a848b8d921d9d1b6d..e55faa8ce87439d36328e12634ddedb37607dc60 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 2bb64edf344d614c5cbafe71be88a8d09fa19634..2cd2e0fbb51940a1959a002b8bfcbcd9bd526b19 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 3d840dbb79cd70eb099799be796e6d9cb4ff0edb..616254d3334a191393c33cf875edf1602c8b99be 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -562,11 +562,22 @@ // Enable this option to scroll long filenames in the SD card menu //#define SCROLL_LONG_FILENAMES - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + /** + * This option allows you to easily reprint the same SD Card file as + * was last printed. At the end of a print, the LCD Menu will jump + * straight to the file previously selected. A single click of the encoder + * wheel will restart the print. Another file or LCD option can be + * selected by using the encoder wheel to navigate through the menu structure. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + #endif // SDSUPPORT /** diff --git a/Marlin/src/feature/Max7219_Debug_LEDs.cpp b/Marlin/src/feature/Max7219_Debug_LEDs.cpp index fe42a1861171ee62bfc96f687b8d9cc8054334f1..ece730e1d2ea0507010ce9a7e33aae32acfa1df8 100644 --- a/Marlin/src/feature/Max7219_Debug_LEDs.cpp +++ b/Marlin/src/feature/Max7219_Debug_LEDs.cpp @@ -328,14 +328,11 @@ void Max7219_idle_tasks() { #endif #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE) - static int debug_cnt = 0; - #ifdef CPU_32_BIT - if (debug_cnt++ > 1000) { - #else - if (debug_cnt++ > 100) { - #endif + static millis_t next_blink = 0; + + if (ELAPSED(millis(), next_blink)) { Max7219_LED_Toggle(7, 7); - debug_cnt = 0; + next_blink = millis() + 750; } #endif diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 37c6a61eca7ee5f225d1413e960282498d91a441..ca036563a0ad0b51c0df2f5c6dd57cd86235c216 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -3742,10 +3742,25 @@ void kill_screen(const char* lcd_msg) { * "Print from SD" submenu * */ + #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE) + uint32_t saved_encoderPosition = 0; + static millis_t assume_print_finished = 0; + #endif + void lcd_sdcard_menu() { ENCODER_DIRECTION_MENUS(); - if (!lcdDrawUpdate && !lcd_clicked) return; // nothing to do (so don't thrash the SD card) - const uint16_t fileCnt = card.get_num_Files(); + + #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE) + if (ELAPSED(millis(), assume_print_finished)) { // if the printer has been busy printing, lcd_sdcard_menu() should not + lcdDrawUpdate = LCDVIEW_REDRAW_NOW; // have been active for 5 seconds. In this case, restore the previous + encoderPosition = saved_encoderPosition; // encoderPosition to the last selected item. + assume_print_finished = millis() + 5000; + } + saved_encoderPosition = encoderPosition; + defer_return_to_status = true; + #endif + + const uint16_t fileCnt = card.getnrfilenames(); START_MENU(); MENU_BACK(MSG_MAIN); card.getWorkDirName(); @@ -4395,6 +4410,9 @@ void kill_screen(const char* lcd_msg) { #if ENABLED(SDSUPPORT) void menu_action_sdfile(const char* filename, char* longFilename) { + #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE) + saved_encoderPosition = encoderPosition; // Save which file was selected for later use + #endif UNUSED(longFilename); card.openAndPrintFile(filename); lcd_return_to_status(); @@ -4702,7 +4720,11 @@ void lcd_update() { uint16_t bbr2 = planner.block_buffer_runtime() >> 1; #if ENABLED(DOGLCD) - if ((lcdDrawUpdate || drawing_screen) && (!bbr2 || (bbr2 > max_display_update_time))) + if ((lcdDrawUpdate || drawing_screen) && (!bbr2 || (bbr2 > max_display_update_time) + #if ENABLED(SDSUPPORT) + || (currentScreen == lcd_sdcard_menu) + #endif + )) #else if (lcdDrawUpdate && (!bbr2 || (bbr2 > max_display_update_time))) #endif @@ -4756,7 +4778,12 @@ void lcd_update() { // Return to Status Screen after a timeout if (currentScreen == lcd_status_screen || defer_return_to_status) + #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE) + if (currentScreen != lcd_sdcard_menu) // lcd_sdcard_menu() does not time out if ENABLED(SD_REPRINT_LAST_SELECTED_FILE) + return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; // When the printer finishes a file, it will wait with the file selected for + #else // a re-print. return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; + #endif else if (ELAPSED(ms, return_to_status_ms)) lcd_return_to_status(); diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index cfa7b513f589dfd26e5be968ed9eb0d1c9e83cef..3afb050b25289fa19b1ad8e682241021ff8bdce1 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -892,6 +892,15 @@ uint16_t CardReader::get_num_Files() { ; } +#if ENABLED(SD_REPRINT_LAST_SELECTED_FILE) + typedef void (*screenFunc_t)(); + extern void lcd_sdcard_menu(); + extern void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder = 0); + extern uint32_t saved_encoderPosition; + extern bool screen_changed, drawing_screen, defer_return_to_status; + void _lcd_synchronize(); // Not declared in any LCD header file. Probably, that should be changed. +#endif + void CardReader::printingHasFinished() { stepper.synchronize(); file.close(); @@ -911,6 +920,18 @@ void CardReader::printingHasFinished() { #if ENABLED(SDCARD_SORT_ALPHA) presort(); #endif + + #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE) + lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; + _lcd_synchronize(); + safe_delay(50); + _lcd_synchronize(); + lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; + drawing_screen = screen_changed = true; + lcd_goto_screen(lcd_sdcard_menu, saved_encoderPosition); + defer_return_to_status = true; + lcd_update(); + #endif } }