diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index d551fe443..3b92bd745 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index dbeb4e293..a3646eb12 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -152,6 +152,10 @@ #include "feature/controllerfan.h" #endif +#if ENABLED(EXTENSIBLE_UI) + #include "lcd/extensible_ui/ui_api.h" +#endif + bool Running = true; /** @@ -609,7 +613,9 @@ void kill(PGM_P lcd_msg) { thermalManager.disable_all_heaters(); disable_all_steppers(); - #if ENABLED(ULTRA_LCD) + #if ENABLED(EXTENSIBLE_UI) + UI::onPrinterKilled(lcd_msg); + #elif ENABLED(ULTRA_LCD) kill_screen(lcd_msg); #else UNUSED(lcd_msg); @@ -958,7 +964,7 @@ void loop() { card.checkautostart(); #endif - #if ENABLED(SDSUPPORT) && ENABLED(ULTIPANEL) + #if ENABLED(SDSUPPORT) && (ENABLED(ULTIPANEL) || ENABLED(EXTENSIBLE_UI)) if (abort_sd_printing) { abort_sd_printing = false; card.stopSDPrint( @@ -978,7 +984,7 @@ void loop() { card.removeJobRecoveryFile(); #endif } - #endif // SDSUPPORT && ULTIPANEL + #endif // SDSUPPORT && (ENABLED(ULTIPANEL) || ENABLED(EXTENSIBLE_UI)) if (commands_in_queue < BUFSIZE) get_available_commands(); advance_command_queue(); diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index d551fe443..3b92bd745 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index 622b242e9..0e2ec0d1c 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -1859,6 +1859,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 47b4f55c9..1f79147ed 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Anet/A2/Configuration.h b/Marlin/src/config/examples/Anet/A2/Configuration.h index dddd775ef..97faf5b2c 100644 --- a/Marlin/src/config/examples/Anet/A2/Configuration.h +++ b/Marlin/src/config/examples/Anet/A2/Configuration.h @@ -1841,6 +1841,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Anet/A2plus/Configuration.h b/Marlin/src/config/examples/Anet/A2plus/Configuration.h index d3a6790a8..65d9243cf 100644 --- a/Marlin/src/config/examples/Anet/A2plus/Configuration.h +++ b/Marlin/src/config/examples/Anet/A2plus/Configuration.h @@ -1841,6 +1841,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index 2783b7348..a83da6e7a 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -1994,6 +1994,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index 0d44449f4..21bb36f94 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -1848,6 +1848,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h index db9fa983d..86d2c9d04 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h index 334ae2386..096105754 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h index 3664f1377..2c5cc0b77 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index a78388200..f109f715e 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -1827,6 +1827,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index 0fd576f6b..f68c7c06e 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index b5f9beca7..12c11b00c 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -1827,6 +1827,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 31d9c362a..b8ca6b5c9 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -1838,6 +1838,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index 4d4962fd0..e4fea3531 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -1849,6 +1849,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h index 4949b576d..d3a0e3808 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h @@ -1844,6 +1844,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h index 568908085..1bd40c6b4 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h @@ -1858,6 +1858,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration.h b/Marlin/src/config/examples/Creality/CR-8/Configuration.h index 187de1365..a229beaaf 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration.h @@ -1849,6 +1849,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h index bd69cf9a6..2c4cb6cb7 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h @@ -1843,6 +1843,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h index 38857b4b9..a87f2ecf2 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h @@ -1843,6 +1843,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h index d4490d40b..65bf896b6 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h @@ -1849,6 +1849,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index 6019be1c5..1b7f26ee1 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -1821,6 +1821,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index d95adb674..46b46d51e 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -1821,6 +1821,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index c42d7ec73..c875ee789 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -1845,6 +1845,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Formbot/Raptor/Configuration.h b/Marlin/src/config/examples/Formbot/Raptor/Configuration.h index 6a354717d..fce1932cf 100644 --- a/Marlin/src/config/examples/Formbot/Raptor/Configuration.h +++ b/Marlin/src/config/examples/Formbot/Raptor/Configuration.h @@ -1945,6 +1945,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h index f95bca033..b7374171d 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h @@ -1886,6 +1886,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h index 8f64ac35e..f083fd1b9 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h @@ -1872,6 +1872,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index e5f96dbf9..62d68c3f4 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -1854,6 +1854,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index b20ea69f4..4c6304594 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h index cdb240df3..7dc310a21 100644 --- a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h @@ -1846,6 +1846,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 9f336788f..5eac4fbd4 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -1855,6 +1855,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index c70cc4dc4..dd06dee91 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -1854,6 +1854,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h index 639987f3f..57f359650 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h index f83e10711..c472fbd6f 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index da0b3c043..72a0db10b 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -1843,6 +1843,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h index 83def4a57..44434e23f 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -1850,6 +1850,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h index 10d7b38fe..97bd91099 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration.h +++ b/Marlin/src/config/examples/MakerParts/Configuration.h @@ -1859,6 +1859,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index dc07a6d6a..b65d723ab 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -1867,6 +1867,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h index 5601bf961..c3887c6b6 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h @@ -1838,6 +1838,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index 19ca33993..d9bde3637 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -1843,6 +1843,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 2af187883..50e44abf1 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -1843,6 +1843,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 6f8782882..f9b59a437 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h index d6f5dc03b..ecfc4169b 100644 --- a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h +++ b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h @@ -1888,6 +1888,15 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index 4734c37fb..bd03d85ba 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index c3cc3c35b..1f424210c 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index 78a473bd3..9636ce618 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -1852,6 +1852,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h index 76adb08dc..ebf969243 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -1841,6 +1841,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/STM32F4/Configuration.h b/Marlin/src/config/examples/STM32F4/Configuration.h index 4b9bc49eb..bc854532d 100644 --- a/Marlin/src/config/examples/STM32F4/Configuration.h +++ b/Marlin/src/config/examples/STM32F4/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 46e733d18..65a7fd9c1 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -1870,6 +1870,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h index df9afdb95..8bcb9b8f9 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration.h +++ b/Marlin/src/config/examples/TheBorg/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index e41e58f1f..9176de6f4 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -1895,6 +1895,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h index c1f46b862..554bb2d8d 100644 --- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h index 581912cf2..e1895fe2d 100644 --- a/Marlin/src/config/examples/Tronxy/X3A/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h @@ -1843,6 +1843,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h index 65d179af6..3064d10f3 100644 --- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h index df113c63c..b5b18ccdd 100644 --- a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h @@ -1850,6 +1850,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h index 779f8f425..fe2cac4b7 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index 5caf98d0f..519b346a1 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -1874,6 +1874,15 @@ #endif // K8200_VM8201 +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index d080f6e44..cc56b0eb1 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index 076554db6..2b86351e5 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h index 40be77397..5e42fc387 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h @@ -1852,6 +1852,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index 3af7debf8..b9bc8afa4 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -1839,6 +1839,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h index 15654ca07..01ef6667d 100644 --- a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h +++ b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h @@ -2030,6 +2030,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index 0d59ad964..4ca4c430e 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -1967,6 +1967,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h index 6de5f8b49..3c68ba523 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h @@ -1966,6 +1966,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 911e8f166..32a85329d 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -1966,6 +1966,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h index fd3e9c4bd..b66318b25 100644 --- a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h @@ -1969,6 +1969,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index 2122badd0..4a48398b1 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -1954,6 +1954,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 5d1490a9c..8a41a79e5 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -1956,6 +1956,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index c87ebfc4a..22aec0491 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -1957,6 +1957,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index 595928a90..1f45169d3 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -1957,6 +1957,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index 3988563bd..6faf4d254 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -1853,6 +1853,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index 55de98dbf..e18b1dcea 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -1842,6 +1842,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index beca84f9c..2c9a83495 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -1841,6 +1841,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 03cb2d0e2..764177ccc 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -1834,6 +1834,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index 9972e9d14..e3f7c8b0c 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -1844,6 +1844,15 @@ // //#define SILVER_GATE_GLCD_CONTROLLER +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + //============================================================================= //============================ Other Controllers ============================ //============================================================================= diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 13233d3d6..500013c9c 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -34,6 +34,10 @@ #include "../inc/MarlinConfig.h" +#if ENABLED(EXTENSIBLE_UI) + #include "../lcd/extensible_ui/ui_api.h" +#endif + #define FIL_RUNOUT_THRESHOLD 5 class FilamentRunoutSensor { @@ -49,6 +53,9 @@ class FilamentRunoutSensor { FORCE_INLINE static void run() { if ((IS_SD_PRINTING || print_job_timer.isRunning()) && check() && !filament_ran_out) { filament_ran_out = true; + #if ENABLED(EXTENSIBLE_UI) + UI::onFilamentRunout(); + #endif enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); planner.synchronize(); } diff --git a/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/src/gcode/eeprom/M500-M504.cpp index 8c5e3af9d..07099c314 100644 --- a/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -25,6 +25,10 @@ #include "../../core/serial.h" #include "../../inc/MarlinConfig.h" +#if ENABLED(EXTENSIBLE_UI) + #include "../../lcd/extensible_ui/ui_api.h" +#endif + #if NUM_SERIAL > 1 #include "../../gcode/queue.h" #endif @@ -40,6 +44,9 @@ */ void GcodeSuite::M500() { (void)settings.save(CHAT_PORT); + #if ENABLED(EXTENSIBLE_UI) + UI::onStoreSettings(); + #endif } /** @@ -58,6 +65,9 @@ void GcodeSuite::M501() { */ void GcodeSuite::M502() { (void)settings.reset(CHAT_PORT); + #if ENABLED(EXTENSIBLE_UI) + UI::onFactoryReset(); + #endif } #if DISABLED(DISABLE_M503) diff --git a/Marlin/src/gcode/stats/M75-M78.cpp b/Marlin/src/gcode/stats/M75-M78.cpp index 351efd10c..742bd3f2e 100644 --- a/Marlin/src/gcode/stats/M75-M78.cpp +++ b/Marlin/src/gcode/stats/M75-M78.cpp @@ -23,20 +23,39 @@ #include "../gcode.h" #include "../../module/printcounter.h" +#if ENABLED(EXTENSIBLE_UI) + #include "../../lcd/extensible_ui/ui_api.h" +#endif + /** * M75: Start print timer */ -void GcodeSuite::M75() { print_job_timer.start(); } +void GcodeSuite::M75() { + print_job_timer.start(); + #if ENABLED(EXTENSIBLE_UI) + UI::onPrintTimerStarted(); + #endif +} /** * M76: Pause print timer */ -void GcodeSuite::M76() { print_job_timer.pause(); } +void GcodeSuite::M76() { + print_job_timer.pause(); + #if ENABLED(EXTENSIBLE_UI) + UI::onPrintTimerPaused(); + #endif +} /** * M77: Stop print timer */ -void GcodeSuite::M77() { print_job_timer.stop(); } +void GcodeSuite::M77() { + print_job_timer.stop(); + #if ENABLED(EXTENSIBLE_UI) + UI::onPrintTimerStopped(); + #endif +} #if ENABLED(PRINTCOUNTER) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 5b9780902..0680306fd 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -543,7 +543,7 @@ #define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)) -#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) +#define HAS_RESUME_CONTINUE (ENABLED(EXTENSIBLE_UI) || ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)) #define Z_MULTI_STEPPER_DRIVERS (ENABLED(Z_DUAL_STEPPER_DRIVERS) || ENABLED(Z_TRIPLE_STEPPER_DRIVERS)) diff --git a/Marlin/src/lcd/extensible_ui/lib/dummy.cpp b/Marlin/src/lcd/extensible_ui/lib/dummy.cpp new file mode 100644 index 000000000..9a7129079 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/dummy.cpp @@ -0,0 +1,50 @@ +/************* + * dummy.cpp * + *************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(EXTENSIBLE_UI) + +#include "../ui_api.h" + +// To implement a new UI, complete the functions below and +// read or update Marlin's state using the methods in the +// UI methods in "../ui_api.h" + +namespace UI { + void onStartup() {} + void onUpdate() {} + void onPrinterKilled(const char* lcd_msg) {} + void onMediaInserted(); + void onMediaError(); + void onMediaRemoved(); + void onPlayTone(const uint16_t frequency, const uint16_t duration) {} + void onPrintTimerStarted() {} + void onPrintTimerPaused() {} + void onPrintTimerStopped() {} + void onFilamentRunout() {} + void onStatusChanged(const char* lcd_msg) {} + void onStatusChanged(progmem_str lcd_msg) {} + void onFactoryReset() {} + void onStoreSettings() {} +} + +#endif // EXTENSIBLE_UI diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp new file mode 100644 index 000000000..e3c552a05 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -0,0 +1,590 @@ +/************** + * ui_api.cpp * + **************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../../Marlin.h" + +#if ENABLED(EXTENSIBLE_UI) + +#include "../../gcode/queue.h" +#include "../../module/motion.h" +#include "../../module/planner.h" +#include "../../module/probe.h" +#include "../../module/printcounter.h" +#include "../../module/temperature.h" +#include "../../sd/cardreader.h" +#include "../../libs/duration_t.h" + +#if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER) + #include "../../module/tool_change.h" +#endif + +#if ENABLED(SDSUPPORT) + #include "../../feature/emergency_parser.h" + + bool abort_sd_printing; // =false +#else + constexpr bool abort_sd_printing = false; +#endif + +#include "ui_api.h" + +#if ENABLED(BACKLASH_GCODE) + extern float backlash_distance_mm[XYZ], backlash_correction; + #ifdef BACKLASH_SMOOTHING_MM + extern float backlash_smoothing_mm; + #endif +#endif + +inline float clamp(const float value, const float minimum, const float maximum) { + return MAX(MIN(value, maximum), minimum); +} + +namespace UI { + + void delay_ms(unsigned long ms) { + safe_delay(ms); + } + + void yield() { + thermalManager.manage_heater(); + } + + float getActualTemp_celsius(const uint8_t extruder) { + return extruder ? + thermalManager.degHotend(extruder - 1) : + #if HAS_HEATED_BED + thermalManager.degBed() + #else + 0 + #endif + ; + } + + float getTargetTemp_celsius(const uint8_t extruder) { + return extruder ? + thermalManager.degTargetHotend(extruder - 1) : + #if HAS_HEATED_BED + thermalManager.degTargetBed() + #else + 0 + #endif + ; + } + + float getFan_percent(const uint8_t fan) { return ((float(fan_speed[fan]) + 1) * 100) / 256; } + + float getAxisPosition_mm(const axis_t axis) { + switch (axis) { + case X: case Y: case Z: + return current_position[axis]; + case E0: case E1: case E2: case E3: case E4: case E5: + return current_position[E_AXIS]; + default: return 0; + } + } + + void setAxisPosition_mm(const axis_t axis, float position, float _feedrate_mm_s) { + #if EXTRUDERS > 1 + const int8_t old_extruder = active_extruder; + #endif + switch (axis) { + case X: case Y: case Z: break; + case E0: case E1: case E2: case E3: case E4: case E5: + active_extruder = axis - E0; + break; + default: return; + } + set_destination_from_current(); + switch (axis) { + case X: case Y: case Z: + destination[Z_AXIS] = position; + break; + case E0: case E1: case E2: case E3: case E4: case E5: + destination[E_AXIS] = position; + break; + } + + const float old_feedrate = feedrate_mm_s; + feedrate_mm_s = _feedrate_mm_s; + prepare_move_to_destination(); + feedrate_mm_s = old_feedrate; + #if EXTRUDERS > 1 + active_extruder = old_extruder; + #endif + } + + void setActiveTool(uint8_t extruder, bool no_move) { + extruder--; // Make zero based + #if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER) + if (extruder != active_extruder) + tool_change(extruder, 0, no_move); + #endif + active_extruder = extruder; + } + + uint8_t getActiveTool() { return active_extruder + 1; } + + bool isMoving() { return planner.has_blocks_queued(); } + + float getAxisSteps_per_mm(const axis_t axis) { + switch (axis) { + case X: case Y: case Z: + return planner.axis_steps_per_mm[axis]; + case E0: case E1: case E2: case E3: case E4: case E5: + return planner.axis_steps_per_mm[E_AXIS_N(axis - E0)]; + default: return 0; + } + } + + void setAxisSteps_per_mm(const axis_t axis, const float steps_per_mm) { + switch (axis) { + case X: case Y: case Z: + planner.axis_steps_per_mm[axis] = steps_per_mm; + break; + case E0: case E1: case E2: case E3: case E4: case E5: + planner.axis_steps_per_mm[E_AXIS_N(axis - E0)] = steps_per_mm; + break; + } + } + + float getAxisMaxFeedrate_mm_s(const axis_t axis) { + switch (axis) { + case X: case Y: case Z: + return planner.max_feedrate_mm_s[axis]; + case E0: case E1: case E2: case E3: case E4: case E5: + return planner.max_feedrate_mm_s[E_AXIS_N(axis - E0)]; + default: return 0; + } + } + + void setAxisMaxFeedrate_mm_s(const axis_t axis, const float max_feedrate_mm_s) { + switch (axis) { + case X: case Y: case Z: + planner.max_feedrate_mm_s[axis] = max_feedrate_mm_s; + break; + case E0: case E1: case E2: case E3: case E4: case E5: + planner.max_feedrate_mm_s[E_AXIS_N(axis - E0)] = max_feedrate_mm_s; + break; + default: return; + } + } + + float getAxisMaxAcceleration_mm_s2(const axis_t axis) { + switch (axis) { + case X: case Y: case Z: + return planner.max_acceleration_mm_per_s2[axis]; + case E0: case E1: case E2: case E3: case E4: case E5: + return planner.max_acceleration_mm_per_s2[E_AXIS_N(axis - E0)]; + default: return 0; + } + } + + void setAxisMaxAcceleration_mm_s2(const axis_t axis, const float max_acceleration_mm_per_s2) { + switch (axis) { + case X: case Y: case Z: + planner.max_acceleration_mm_per_s2[axis] = max_acceleration_mm_per_s2; + break; + case E0: case E1: case E2: case E3: case E4: case E5: + planner.max_acceleration_mm_per_s2[E_AXIS_N(axis - E0)] = max_acceleration_mm_per_s2; + break; + default: return; + } + } + + #if ENABLED(LIN_ADVANCE) + float getLinearAdvance_mm_mm_s(const uint8_t extruder) { + return (extruder < EXTRUDERS) ? planner.extruder_advance_K[extruder] : 0; + } + + void setLinearAdvance_mm_mm_s(const uint8_t extruder, const float k) { + if (extruder < EXTRUDERS) + planner.extruder_advance_K[extruder] = clamp(k, 0, 999); + } + #endif + + #if ENABLED(JUNCTION_DEVIATION) + float getJunctionDeviation_mm() { + return planner.junction_deviation_mm; + } + + void setJunctionDeviation_mm(const float junc_dev) { + planner.junction_deviation_mm = clamp(junc_dev, 0.01, 0.3); + planner.recalculate_max_e_jerk(); + } + #else + float getAxisMaxJerk_mm_s(const axis_t axis) { + switch (axis) { + case X: case Y: case Z: + return planner.max_jerk[axis]; + case E0: case E1: case E2: case E3: case E4: case E5: + return planner.max_jerk[E_AXIS]; + default: return 0; + } + } + + void setAxisMaxJerk_mm_s(const axis_t axis, const float max_jerk) { + switch (axis) { + case X: case Y: case Z: + planner.max_jerk[axis] = max_jerk; + break; + case E0: case E1: case E2: case E3: case E4: case E5: + planner.max_jerk[E_AXIS] = max_jerk; + break; + default: return; + } + } + #endif + + float getMinFeedrate_mm_s() { return planner.min_feedrate_mm_s; } + float getMinTravelFeedrate_mm_s() { return planner.min_travel_feedrate_mm_s; } + float getPrintingAcceleration_mm_s2() { return planner.acceleration; } + float getRetractAcceleration_mm_s2() { return planner.retract_acceleration; } + float getTravelAcceleration_mm_s2() { return planner.travel_acceleration; } + void setMinFeedrate_mm_s(const float fr) { planner.min_feedrate_mm_s = fr; } + void setMinTravelFeedrate_mm_s(const float fr) { planner.min_travel_feedrate_mm_s = fr; } + void setPrintingAcceleration_mm_per_s2(const float acc) { planner.acceleration = acc; } + void setRetractAcceleration_mm_s2(const float acc) { planner.retract_acceleration = acc; } + void setTravelAcceleration_mm_s2(const float acc) { planner.travel_acceleration = acc; } + + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + float getZOffset_mm() { + #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) + if (active_extruder != 0) + return hotend_offset[Z_AXIS][active_extruder]; + else + #endif + return zprobe_zoffset; + } + + void setZOffset_mm(const float zoffset_mm) { + const float diff = (zoffset_mm - getZOffset_mm()) / planner.steps_to_mm[Z_AXIS]; + incrementZOffset_steps(diff > 0 ? ceil(diff) : floor(diff)); + } + + void incrementZOffset_steps(int16_t babystep_increment) { + #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) + const bool do_probe = (active_extruder == 0); + #else + constexpr bool do_probe = true; + #endif + const float diff = planner.steps_to_mm[Z_AXIS] * babystep_increment, + new_probe_offset = zprobe_zoffset + diff, + new_offs = + #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) + do_probe ? new_probe_offset : hotend_offset[Z_AXIS][active_extruder] - diff + #else + new_probe_offset + #endif + ; + if (WITHIN(new_offs, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) { + + thermalManager.babystep_axis(Z_AXIS, babystep_increment); + + if (do_probe) zprobe_zoffset = new_offs; + #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) + else hotend_offset[Z_AXIS][active_extruder] = new_offs; + #endif + } + } + #endif // ENABLED(BABYSTEP_ZPROBE_OFFSET) + + #if HOTENDS > 1 + float getNozzleOffset_mm(const axis_t axis, uint8_t extruder) { + if (extruder >= HOTENDS) return 0; + return hotend_offset[axis][extruder]; + } + + void setNozzleOffset_mm(const axis_t axis, uint8_t extruder, float offset) { + if (extruder >= HOTENDS) return; + hotend_offset[axis][extruder] = offset; + } + #endif + + #if ENABLED(BACKLASH_GCODE) + float getAxisBacklash_mm(const axis_t axis) {return backlash_distance_mm[axis];} + void setAxisBacklash_mm(const axis_t axis, float distance) + {backlash_distance_mm[axis] = clamp(distance,0,5);} + + float getBacklashCorrection_percent() {return backlash_correction*100;} + void setBacklashCorrection_percent(float percent) {backlash_correction = clamp(percent, 0, 100)/100;} + + #ifdef BACKLASH_SMOOTHING_MM + float getBacklashSmoothing_mm() {return backlash_smoothing_mm;} + void setBacklashSmoothing_mm(float distance) {backlash_smoothing_mm = clamp(distance,0,999);} + #endif + #endif + + uint8_t getProgress_percent() { + #if ENABLED(SDSUPPORT) + return card.percentDone(); + #else + return 0; + #endif + } + + uint32_t getProgress_seconds_elapsed() { + const duration_t elapsed = print_job_timer.duration(); + return elapsed.value; + } + + float getFeedRate_percent() { + return feedrate_percentage; + } + + void enqueueCommands(progmem_str gcode) { + enqueue_and_echo_commands_P((PGM_P)gcode); + } + + bool isAxisPositionKnown(const axis_t axis) { + switch (axis) { + case X: case Y: case Z: + return TEST(axis_known_position, axis); + default: return true; + } + } + + progmem_str getFirmwareName() { + return F("Marlin " SHORT_BUILD_VERSION); + } + + void setTargetTemp_celsius(const uint8_t extruder, float temp) { + if (extruder) + thermalManager.setTargetHotend(clamp(temp,0,500), extruder-1); + #if HAS_HEATED_BED + else + thermalManager.setTargetBed(clamp(temp,0,200)); + #endif + } + + void setFan_percent(const uint8_t fan, float percent) { + if (fan < FAN_COUNT) + fan_speed[fan] = clamp(round(percent * 255 / 100), 0, 255); + } + + void setFeedrate_percent(const float percent) { + feedrate_percentage = clamp(percent, 10, 500); + } + + void printFile(const char *filename) { + #if ENABLED(SDSUPPORT) + card.openAndPrintFile(filename); + #endif + } + + bool isPrintingFromMedia() { + #if ENABLED(SDSUPPORT) + return card.cardOK && card.isFileOpen() && card.sdprinting; + #else + return false; + #endif + } + + bool isPrinting() { + return (planner.movesplanned() || IS_SD_PRINTING || + #if ENABLED(SDSUPPORT) + (card.cardOK && card.isFileOpen()) + #else + false + #endif + ); + } + + bool isMediaInserted() { + #if ENABLED(SDSUPPORT) + return IS_SD_INSERTED && card.cardOK; + #else + return false; + #endif + } + + void pausePrint() { + #if ENABLED(SDSUPPORT) + card.pauseSDPrint(); + print_job_timer.pause(); + #if ENABLED(PARK_HEAD_ON_PAUSE) + enqueue_and_echo_commands_P(PSTR("M125")); + #endif + UI::onStatusChanged(PSTR(MSG_PRINT_PAUSED)); + #endif + } + + void resumePrint() { + #if ENABLED(SDSUPPORT) + #if ENABLED(PARK_HEAD_ON_PAUSE) + enqueue_and_echo_commands_P(PSTR("M24")); + #else + card.startFileprint(); + print_job_timer.start(); + #endif + UI::onStatusChanged(PSTR(MSG_PRINTING)); + #endif + } + + void stopPrint() { + #if ENABLED(SDSUPPORT) + wait_for_heatup = wait_for_user = false; + abort_sd_printing = true; + UI::onStatusChanged(PSTR(MSG_PRINT_ABORTED)); + #endif + } + + FileList::FileList() { + refresh(); + } + + void FileList::refresh() { + num_files = 0xFFFF; + } + + bool FileList::seek(uint16_t pos, bool skip_range_check) { + #if ENABLED(SDSUPPORT) + if (!skip_range_check && pos > (count() - 1)) return false; + const uint16_t nr = + #if ENABLED(SDCARD_RATHERRECENTFIRST) && DISABLED(SDCARD_SORT_ALPHA) + count() - 1 - + #endif + pos; + + #if ENABLED(SDCARD_SORT_ALPHA) + card.getfilename_sorted(nr); + #else + card.getfilename(nr); + #endif + return card.filename && card.filename[0] != '\0'; + #endif + } + + const char* FileList::filename() { + #if ENABLED(SDSUPPORT) + return (card.longFilename && card.longFilename[0]) ? card.longFilename : card.filename; + #else + return ""; + #endif + } + + const char* FileList::shortFilename() { + #if ENABLED(SDSUPPORT) + return card.filename; + #else + return ""; + #endif + } + + const char* FileList::longFilename() { + #if ENABLED(SDSUPPORT) + return card.longFilename; + #else + return ""; + #endif + } + + bool FileList::isDir() { + #if ENABLED(SDSUPPORT) + return card.filenameIsDir; + #else + return false; + #endif + } + + uint16_t FileList::count() { + #if ENABLED(SDSUPPORT) + if (num_files == 0xFFFF) num_files = card.get_num_Files(); + return num_files; + #endif + } + + bool FileList::isAtRootDir() { + #if ENABLED(SDSUPPORT) + card.getWorkDirName(); + return card.filename[0] == '/'; + #else + return true; + #endif + } + + void FileList::upDir() { + #if ENABLED(SDSUPPORT) + card.updir(); + num_files = 0xFFFF; + #endif + } + + void FileList::changeDir(const char *dirname) { + #if ENABLED(SDSUPPORT) + card.chdir(dirname); + num_files = 0xFFFF; + #endif + } + +} // namespace UI + +// At the moment, we piggy-back off the ultralcd calls, but this could be cleaned up in the future + +void lcd_init() { + #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT) + SET_INPUT_PULLUP(SD_DETECT_PIN); + #endif + UI::onStartup(); +} + +void lcd_update() { + #if ENABLED(SDSUPPORT) + static bool last_sd_status; + const bool sd_status = IS_SD_INSERTED; + if (sd_status != last_sd_status) { + last_sd_status = sd_status; + if (sd_status) { + card.initsd(); + if (card.cardOK) + UI::onMediaInserted(); + else + UI::onMediaError(); + } + else { + const bool ok = card.cardOK; + card.release(); + if (ok) + UI::onMediaRemoved(); + } + } + #endif // SDSUPPORT + UI::onUpdate(); +} + +bool lcd_hasstatus() { return true; } +bool lcd_detected() { return true; } +void lcd_reset_alert_level() {} +void lcd_refresh() {} +void lcd_setstatus(const char * const message, const bool persist /* = false */) { UI::onStatusChanged(message); } +void lcd_setstatusPGM(const char * const message, int8_t level /* = 0 */) { UI::onStatusChanged((progmem_str)message); } +void lcd_reset_status() {} +void lcd_setalertstatusPGM(const char * const message) { lcd_setstatusPGM(message, 0); } +void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...) { + char buff[64]; + va_list args; + va_start(args, fmt); + vsnprintf_P(buff, sizeof(buff), fmt, args); + va_end(args); + buff[63] = '\0'; + UI::onStatusChanged(buff); +} + +#endif // EXTENSIBLE_UI diff --git a/Marlin/src/lcd/extensible_ui/ui_api.h b/Marlin/src/lcd/extensible_ui/ui_api.h new file mode 100644 index 000000000..482c6df1e --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/ui_api.h @@ -0,0 +1,164 @@ +/************ + * ui_api.h * + ************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "../../inc/MarlinConfig.h" + +typedef const __FlashStringHelper *progmem_str; + +namespace UI { + + enum axis_t : uint8_t { X, Y, Z, E0, E1, E2, E3, E4, E5 }; + + constexpr uint8_t extruderCount = EXTRUDERS; + constexpr uint8_t fanCount = FAN_COUNT; + + // The following methods should be used by the extension module to + // query or change Marlin's state. + + progmem_str getFirmwareName(); + + bool isAxisPositionKnown(const axis_t axis); + bool isMoving(); + + float getActualTemp_celsius(const uint8_t extruder); + float getTargetTemp_celsius(const uint8_t extruder); + float getFan_percent(const uint8_t fan); + float getAxisPosition_mm(const axis_t axis); + float getAxisSteps_per_mm(const axis_t axis); + float getAxisMaxFeedrate_mm_s(const axis_t axis); + float getAxisMaxAcceleration_mm_s2(const axis_t axis); + float getMinFeedrate_mm_s(); + float getMinTravelFeedrate_mm_s(); + float getPrintingAcceleration_mm_per_s2(); + float getRetractAcceleration_mm_per_s2(); + float getTravelAcceleration_mm_per_s2(); + float getFeedRate_percent(); + uint8_t getProgress_percent(); + uint32_t getProgress_seconds_elapsed(); + + void setTargetTemp_celsius(const uint8_t extruder, float temp); + void setFan_percent(const uint8_t fan, const float percent); + void setAxisPosition_mm(const axis_t axis, float position, float _feedrate_mm_s); + void setAxisSteps_per_mm(const axis_t axis, const float steps_per_mm); + void setAxisMaxFeedrate_mm_s(const axis_t axis, const float max_feedrate_mm_s); + void setAxisMaxAcceleration_mm_s2(const axis_t axis, const float max_acceleration_mm_per_s2); + void setMinFeedrate_mm_s(const float min_feedrate_mm_s); + void setMinTravelFeedrate_mm_s(const float min_travel_feedrate_mm_s); + void setPrintingAcceleration_mm_s2(const float acceleration); + void setRetractAcceleration_mm_s2(const float retract_acceleration); + void setTravelAcceleration_mm_s2(const float travel_acceleration); + void setFeedrate_percent(const float percent); + + #if ENABLED(LIN_ADVANCE) + float getLinearAdvance_mm_mm_s(const uint8_t extruder); + void setLinearAdvance_mm_mm_s(const uint8_t extruder, const float k); + #endif + + #if ENABLED(JUNCTION_DEVIATION) + float getJunctionDeviation_mm(); + void setJunctionDeviation_mm(const float junc_dev); + #else + float getAxisMaxJerk_mm_s(const axis_t axis); + void setAxisMaxJerk_mm_s(const axis_t axis, const float max_jerk); + #endif + + void setActiveTool(uint8_t extruder, bool no_move); + uint8_t getActiveTool(); + + #if HOTENDS > 1 + float getNozzleOffset_mm(const axis_t axis, uint8_t extruder); + void setNozzleOffset_mm(const axis_t axis, uint8_t extruder, float offset); + #endif + + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + float getZOffset_mm(); + void setZOffset_mm(const float zoffset_mm); + void incrementZOffset_steps(const int16_t babystep_increment); + #endif + + #if ENABLED(BACKLASH_GCODE) + float getAxisBacklash_mm(const axis_t axis); + void setAxisBacklash_mm(const axis_t axis, float distance); + + float getBacklashCorrection_percent(); + void setBacklashCorrection_percent(float percent); + + #ifdef BACKLASH_SMOOTHING_MM + float getBacklashSmoothing_mm(); + void setBacklashSmoothing_mm(float distance); + #endif + #endif + + void delay_ms(unsigned long ms); + void yield(); // Within lengthy loop, call this periodically + + void enqueueCommands(progmem_str gcode); + + void printFile(const char *filename); + bool isPrintingFromMedia(); + bool isPrinting(); + void stopPrint(); + void pausePrint(); + void resumePrint(); + + bool isMediaInserted(); + + class FileList { + private: + uint16_t num_files; + + public: + FileList(); + void refresh(); + bool seek(uint16_t, bool skip_range_check = false); + + const char *longFilename(); + const char *shortFilename(); + const char *filename(); + bool isDir(); + + void changeDir(const char *dirname); + void upDir(); + bool isAtRootDir(); + uint16_t count(); + }; + + // The following event handlers are to be declared by the extension + // module and will be called by Marlin. + + void onStartup(); + void onUpdate(); + void onMediaInserted(); + void onMediaError(); + void onMediaRemoved(); + void onPlayTone(const uint16_t frequency, const uint16_t duration); + void onPrinterKilled(const char* msg); + void onPrintTimerStarted(); + void onPrintTimerPaused(); + void onPrintTimerStopped(); + void onFilamentRunout(); + void onStatusChanged(const char* msg); + void onStatusChanged(progmem_str msg); + void onFactoryReset(); + void onStoreSettings(); +}; diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index 58863a4d3..2b262f6af 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -25,7 +25,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(ULTRA_LCD) || ENABLED(MALYAN_LCD) +#if ENABLED(ULTRA_LCD) || ENABLED(MALYAN_LCD) || ENABLED(EXTENSIBLE_UI) void lcd_init(); bool lcd_detected(); void lcd_update(); @@ -208,6 +208,15 @@ void wait_for_release(); #endif +#elif ENABLED(EXTENSIBLE_UI) + // These functions are defined elsewhere + void lcd_setstatus(const char* const message, const bool persist=false); + void lcd_setstatusPGM(const char* const message, const int8_t level=0); + void lcd_status_printf_P(const uint8_t level, const char * const fmt, ...); + void lcd_reset_status(); + void lcd_refresh(); + void lcd_reset_alert_level(); + bool lcd_hasstatus(); #else // MALYAN_LCD or no LCD constexpr bool lcd_wait_for_move = false; @@ -279,7 +288,7 @@ void lcd_reselect_last_file(); #endif -#if ENABLED(ULTIPANEL) && ENABLED(SDSUPPORT) +#if (ENABLED(EXTENSIBLE_UI) || ENABLED(ULTIPANEL)) && ENABLED(SDSUPPORT) extern bool abort_sd_printing; #else constexpr bool abort_sd_printing = false; diff --git a/Marlin/src/libs/buzzer.cpp b/Marlin/src/libs/buzzer.cpp index 117104001..6fb4d51a0 100644 --- a/Marlin/src/libs/buzzer.cpp +++ b/Marlin/src/libs/buzzer.cpp @@ -27,6 +27,10 @@ #include "buzzer.h" #include "../module/temperature.h" +#if ENABLED(EXTENSIBLE_UI) + #include "../lcd/extensible_ui/ui_api.h" +#endif + Buzzer::state_t Buzzer::state; CircularQueue Buzzer::buffer; Buzzer buzzer; @@ -58,7 +62,11 @@ void Buzzer::tick() { state.endtime = now + state.tone.duration; if (state.tone.frequency > 0) { - #if ENABLED(SPEAKER) + #if ENABLED(EXTENSIBLE_UI) + CRITICAL_SECTION_START; + UI::onPlayTone(state.tone.frequency, state.tone.duration); + CRITICAL_SECTION_END; + #elif ENABLED(SPEAKER) CRITICAL_SECTION_START; ::tone(BEEPER_PIN, state.tone.frequency, state.tone.duration); CRITICAL_SECTION_END; diff --git a/Marlin/src/libs/buzzer.h b/Marlin/src/libs/buzzer.h index 2da9b8dee..6661c1045 100644 --- a/Marlin/src/libs/buzzer.h +++ b/Marlin/src/libs/buzzer.h @@ -28,7 +28,7 @@ // Make a buzzer and macro #if ENABLED(LCD_USE_I2C_BUZZER) // BUZZ() will be defined in ultralcd.h -#elif PIN_EXISTS(BEEPER) +#elif PIN_EXISTS(BEEPER) || ENABLED(EXTENSIBLE_UI) #include "circularqueue.h" diff --git a/Marlin/src/pins/pins_ARCHIM2.h b/Marlin/src/pins/pins_ARCHIM2.h index ea9348cef..824a14923 100644 --- a/Marlin/src/pins/pins_ARCHIM2.h +++ b/Marlin/src/pins/pins_ARCHIM2.h @@ -163,22 +163,21 @@ // #define SDSS 87 // D87 PA29 CS -////////////////////////// -// LCDs and Controllers // -////////////////////////// - -#if ENABLED(ULTRA_LCD) - #if ENABLED(NEWPANEL) - #define BEEPER_PIN 23 // D24 PA15_CTS1 - #define LCD_PINS_RS 17 // D17 PA12_RXD1 - #define LCD_PINS_ENABLE 24 // D23 PA14_RTS1 - #define LCD_PINS_D4 69 // D69 PA0_CANTX0 - #define LCD_PINS_D5 54 // D54 PA16_SCK1 - #define LCD_PINS_D6 68 // D68 PA1_CANRX0 - #define LCD_PINS_D7 34 // D34 PC2_PWML0 +// +// LCD / Controller +// +#if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) + #define BEEPER_PIN 23 // D24 PA15_CTS1 + #define LCD_PINS_RS 17 // D17 PA12_RXD1 + #define LCD_PINS_ENABLE 24 // D23 PA14_RTS1 + #define LCD_PINS_D4 69 // D69 PA0_CANTX0 + #define LCD_PINS_D5 54 // D54 PA16_SCK1 + #define LCD_PINS_D6 68 // D68 PA1_CANRX0 + #define LCD_PINS_D7 34 // D34 PC2_PWML0 - #define SD_DETECT_PIN 2 // D2 PB25_TIOA0 + #define SD_DETECT_PIN 2 // D2 PB25_TIOA0 + #if ENABLED(NEWPANEL) // Buttons on AUX-2 #define BTN_EN1 60 // D60 PA3_TIOB1 #define BTN_EN2 13 // D13 PB27_TIOB0