Browse Source

Extensible user interface API (#11193)

pull/1/head
Marcio Teixeira 6 years ago
committed by Scott Lahteine
parent
commit
906a24fa81
  1. 9
      Marlin/Configuration.h
  2. 12
      Marlin/src/Marlin.cpp
  3. 9
      Marlin/src/config/default/Configuration.h
  4. 9
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  5. 9
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  6. 9
      Marlin/src/config/examples/Anet/A2/Configuration.h
  7. 9
      Marlin/src/config/examples/Anet/A2plus/Configuration.h
  8. 9
      Marlin/src/config/examples/Anet/A6/Configuration.h
  9. 9
      Marlin/src/config/examples/Anet/A8/Configuration.h
  10. 9
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  11. 9
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
  12. 9
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
  13. 9
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  14. 9
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  15. 9
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  16. 9
      Marlin/src/config/examples/Cartesio/Configuration.h
  17. 9
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  18. 9
      Marlin/src/config/examples/Creality/CR-10S/Configuration.h
  19. 9
      Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
  20. 9
      Marlin/src/config/examples/Creality/CR-8/Configuration.h
  21. 9
      Marlin/src/config/examples/Creality/Ender-2/Configuration.h
  22. 9
      Marlin/src/config/examples/Creality/Ender-3/Configuration.h
  23. 9
      Marlin/src/config/examples/Creality/Ender-4/Configuration.h
  24. 9
      Marlin/src/config/examples/Felix/Configuration.h
  25. 9
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  26. 9
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  27. 9
      Marlin/src/config/examples/Formbot/Raptor/Configuration.h
  28. 9
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h
  29. 9
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h
  30. 9
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  31. 9
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  32. 9
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h
  33. 9
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
  34. 9
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
  35. 9
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
  36. 9
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
  37. 9
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  38. 9
      Marlin/src/config/examples/JGAurora/A5/Configuration.h
  39. 9
      Marlin/src/config/examples/MakerParts/Configuration.h
  40. 9
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  41. 9
      Marlin/src/config/examples/Malyan/M200/Configuration.h
  42. 9
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  43. 9
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
  44. 9
      Marlin/src/config/examples/Mks/Sbase/Configuration.h
  45. 9
      Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
  46. 9
      Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
  47. 9
      Marlin/src/config/examples/RigidBot/Configuration.h
  48. 9
      Marlin/src/config/examples/SCARA/Configuration.h
  49. 9
      Marlin/src/config/examples/STM32F10/Configuration.h
  50. 9
      Marlin/src/config/examples/STM32F4/Configuration.h
  51. 9
      Marlin/src/config/examples/Sanguinololu/Configuration.h
  52. 9
      Marlin/src/config/examples/TheBorg/Configuration.h
  53. 9
      Marlin/src/config/examples/TinyBoy2/Configuration.h
  54. 9
      Marlin/src/config/examples/Tronxy/X1/Configuration.h
  55. 9
      Marlin/src/config/examples/Tronxy/X3A/Configuration.h
  56. 9
      Marlin/src/config/examples/Tronxy/X5S/Configuration.h
  57. 9
      Marlin/src/config/examples/Tronxy/XY100/Configuration.h
  58. 9
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
  59. 9
      Marlin/src/config/examples/Velleman/K8200/Configuration.h
  60. 9
      Marlin/src/config/examples/Velleman/K8400/Configuration.h
  61. 9
      Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
  62. 9
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
  63. 9
      Marlin/src/config/examples/adafruit/ST7565/Configuration.h
  64. 9
      Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h
  65. 9
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
  66. 9
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
  67. 9
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
  68. 9
      Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
  69. 9
      Marlin/src/config/examples/delta/generic/Configuration.h
  70. 9
      Marlin/src/config/examples/delta/kossel_mini/Configuration.h
  71. 9
      Marlin/src/config/examples/delta/kossel_pro/Configuration.h
  72. 9
      Marlin/src/config/examples/delta/kossel_xl/Configuration.h
  73. 9
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
  74. 9
      Marlin/src/config/examples/makibox/Configuration.h
  75. 9
      Marlin/src/config/examples/stm32f103ret6/Configuration.h
  76. 9
      Marlin/src/config/examples/tvrrug/Round2/Configuration.h
  77. 9
      Marlin/src/config/examples/wt150/Configuration.h
  78. 7
      Marlin/src/feature/runout.h
  79. 10
      Marlin/src/gcode/eeprom/M500-M504.cpp
  80. 25
      Marlin/src/gcode/stats/M75-M78.cpp
  81. 2
      Marlin/src/inc/Conditionals_LCD.h
  82. 50
      Marlin/src/lcd/extensible_ui/lib/dummy.cpp
  83. 590
      Marlin/src/lcd/extensible_ui/ui_api.cpp
  84. 164
      Marlin/src/lcd/extensible_ui/ui_api.h
  85. 13
      Marlin/src/lcd/ultralcd.h
  86. 10
      Marlin/src/libs/buzzer.cpp
  87. 2
      Marlin/src/libs/buzzer.h
  88. 27
      Marlin/src/pins/pins_ARCHIM2.h

9
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 ============================
//=============================================================================

12
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();

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

9
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 ============================
//=============================================================================

7
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();
}

10
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)

25
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)

2
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))

50
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: <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

@ -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

@ -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();
};

13
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;

10
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<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;

2
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"

27
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

Loading…
Cancel
Save