Browse Source

ExtUI additions (#18447)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
InsanityAutomation 3 years ago
parent
commit
3b80690a71
No account linked to committer's email address

+ 4
- 0
Marlin/Configuration.h View File

@@ -2121,6 +2121,10 @@
2121 2121
 //
2122 2122
 //#define EXTENSIBLE_UI
2123 2123
 
2124
+#if ENABLED(EXTENSIBLE_UI)
2125
+  //#define EXTUI_LOCAL_BEEPER // Enables use of local Beeper pin with external display
2126
+#endif
2127
+
2124 2128
 //=============================================================================
2125 2129
 //=============================== Graphical TFTs ==============================
2126 2130
 //=============================================================================

+ 3
- 0
Marlin/src/lcd/extui/ui_api.cpp View File

@@ -590,6 +590,8 @@ namespace ExtUI {
590 590
   #if HAS_FILAMENT_SENSOR
591 591
     bool getFilamentRunoutEnabled()                 { return runout.enabled; }
592 592
     void setFilamentRunoutEnabled(const bool value) { runout.enabled = value; }
593
+    bool getFilamentRunoutState()                   { return runout.filament_ran_out; }
594
+    void setFilamentRunoutState(const bool value)   { runout.filament_ran_out = value; }
593 595
 
594 596
     #if HAS_FILAMENT_RUNOUT_DISTANCE
595 597
       float getFilamentRunoutDistance_mm()                 { return runout.runout_distance(); }
@@ -884,6 +886,7 @@ namespace ExtUI {
884 886
   #endif
885 887
 
886 888
   void injectCommands_P(PGM_P const gcode) { queue.inject_P(gcode); }
889
+  void injectCommands(char * const gcode)  { queue.inject(gcode); }
887 890
 
888 891
   bool commandsInQueue() { return (planner.movesplanned() || queue.has_commands_queued()); }
889 892
 

+ 3
- 0
Marlin/src/lcd/extui/ui_api.h View File

@@ -74,6 +74,7 @@ namespace ExtUI {
74 74
   bool canMove(const axis_t);
75 75
   bool canMove(const extruder_t);
76 76
   void injectCommands_P(PGM_P const);
77
+  void injectCommands(char * const);
77 78
   bool commandsInQueue();
78 79
 
79 80
   bool isHeaterIdle(const heater_t);
@@ -236,6 +237,8 @@ namespace ExtUI {
236 237
   #if HAS_FILAMENT_SENSOR
237 238
     bool getFilamentRunoutEnabled();
238 239
     void setFilamentRunoutEnabled(const bool);
240
+    bool getFilamentRunoutState();
241
+    void setFilamentRunoutState(const bool);
239 242
 
240 243
     #if HAS_FILAMENT_RUNOUT_DISTANCE
241 244
       float getFilamentRunoutDistance_mm();

+ 2
- 1
Marlin/src/libs/buzzer.cpp View File

@@ -66,7 +66,8 @@ void Buzzer::tick() {
66 66
         CRITICAL_SECTION_START();
67 67
         ExtUI::onPlayTone(state.tone.frequency, state.tone.duration);
68 68
         CRITICAL_SECTION_END();
69
-      #elif ENABLED(SPEAKER)
69
+      #endif
70
+      #if ENABLED(SPEAKER) && (DISABLED(EXTENSIBLE_UI) || ENABLED(EXTUI_LOCAL_BEEPER))
70 71
         CRITICAL_SECTION_START();
71 72
         ::tone(BEEPER_PIN, state.tone.frequency, state.tone.duration);
72 73
         CRITICAL_SECTION_END();

Loading…
Cancel
Save