Extensible user interface API (#11193)
This commit is contained in:
parent
ee253991d4
commit
906a24fa81
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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();
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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 ============================
|
||||
//=============================================================================
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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))
|
||||
|
50
Marlin/src/lcd/extensible_ui/lib/dummy.cpp
Normal file
50
Marlin/src/lcd/extensible_ui/lib/dummy.cpp
Normal file
@ -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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#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
|
590
Marlin/src/lcd/extensible_ui/ui_api.cpp
Normal file
590
Marlin/src/lcd/extensible_ui/ui_api.cpp
Normal file
@ -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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#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
|
164
Marlin/src/lcd/extensible_ui/ui_api.h
Normal file
164
Marlin/src/lcd/extensible_ui/ui_api.h
Normal file
@ -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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#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();
|
||||
};
|
@ -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;
|
||||
|
@ -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<tone_t, TONE_QUEUE_LENGTH> 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;
|
||||
|
@ -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"
|
||||
|
||||
|
@ -163,22 +163,21 @@
|
||||
//
|
||||
#define SDSS 87 // D87 PA29 CS
|
||||
|
||||
//////////////////////////
|
||||
// LCDs and Controllers //
|
||||
//////////////////////////
|
||||
//
|
||||
// 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
|
||||
|
||||
#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
|
||||
|
||||
#define SD_DETECT_PIN 2 // D2 PB25_TIOA0
|
||||
|
||||
// Buttons on AUX-2
|
||||
#define BTN_EN1 60 // D60 PA3_TIOB1
|
||||
#define BTN_EN2 13 // D13 PB27_TIOB0
|
||||
|
Loading…
Reference in New Issue
Block a user