Browse Source

Also suppress keepalive with suspend_auto_report

Scott Lahteine 7 years ago
parent
commit
ae39fbd646

+ 1
- 1
Marlin/src/Marlin.cpp View File

@@ -187,7 +187,7 @@ volatile bool wait_for_heatup = true;
187 187
   volatile bool wait_for_user = false;
188 188
 #endif
189 189
 
190
-#if HAS_AUTO_REPORTING
190
+#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
191 191
   bool suspend_auto_report; // = false
192 192
 #endif
193 193
 

+ 1
- 1
Marlin/src/Marlin.h View File

@@ -179,7 +179,7 @@ extern volatile bool wait_for_heatup;
179 179
   extern volatile bool wait_for_user;
180 180
 #endif
181 181
 
182
-#if HAS_AUTO_REPORTING
182
+#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
183 183
   extern bool suspend_auto_report;
184 184
 #endif
185 185
 

+ 2
- 2
Marlin/src/feature/bedlevel/ubl/ubl.cpp View File

@@ -195,7 +195,7 @@
195 195
   // 2 : disply of the map data on a RepRap Graphical LCD Panel
196 196
 
197 197
   void unified_bed_leveling::display_map(const int map_type) {
198
-    #if HAS_AUTO_REPORTING
198
+    #if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
199 199
       suspend_auto_report = true;
200 200
     #endif
201 201
 
@@ -264,7 +264,7 @@
264 264
       SERIAL_EOL();
265 265
     }
266 266
 
267
-    #if HAS_AUTO_REPORTING
267
+    #if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
268 268
       suspend_auto_report = false;
269 269
     #endif
270 270
   }

+ 2
- 2
Marlin/src/gcode/gcode.cpp View File

@@ -40,7 +40,7 @@ GcodeSuite gcode;
40 40
   #include "../feature/mixing.h"
41 41
 #endif
42 42
 
43
-#include "../Marlin.h" // for idle()
43
+#include "../Marlin.h" // for idle() and suspend_auto_report
44 44
 
45 45
 uint8_t GcodeSuite::target_extruder;
46 46
 millis_t GcodeSuite::previous_cmd_ms;
@@ -749,7 +749,7 @@ void GcodeSuite::process_next_command() {
749 749
   void GcodeSuite::host_keepalive() {
750 750
     const millis_t ms = millis();
751 751
     static millis_t next_busy_signal_ms = 0;
752
-    if (host_keepalive_interval && busy_state != NOT_BUSY) {
752
+    if (!suspend_auto_report && host_keepalive_interval && busy_state != NOT_BUSY) {
753 753
       if (PENDING(ms, next_busy_signal_ms)) return;
754 754
       switch (busy_state) {
755 755
         case IN_HANDLER:

Loading…
Cancel
Save