From ae39fbd646829b33f0ec6d181bcdc0bdc61f0b19 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 21 Mar 2018 00:29:09 -0500 Subject: [PATCH] Also suppress keepalive with suspend_auto_report --- Marlin/src/Marlin.cpp | 2 +- Marlin/src/Marlin.h | 2 +- Marlin/src/feature/bedlevel/ubl/ubl.cpp | 4 ++-- Marlin/src/gcode/gcode.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 5ffd30f53..7317fb4b4 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -187,7 +187,7 @@ volatile bool wait_for_heatup = true; volatile bool wait_for_user = false; #endif -#if HAS_AUTO_REPORTING +#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE) bool suspend_auto_report; // = false #endif diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h index 5a554b258..25f2e0897 100644 --- a/Marlin/src/Marlin.h +++ b/Marlin/src/Marlin.h @@ -179,7 +179,7 @@ extern volatile bool wait_for_heatup; extern volatile bool wait_for_user; #endif -#if HAS_AUTO_REPORTING +#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE) extern bool suspend_auto_report; #endif diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index 2b7aaf2f7..2ddca1a86 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -195,7 +195,7 @@ // 2 : disply of the map data on a RepRap Graphical LCD Panel void unified_bed_leveling::display_map(const int map_type) { - #if HAS_AUTO_REPORTING + #if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE) suspend_auto_report = true; #endif @@ -264,7 +264,7 @@ SERIAL_EOL(); } - #if HAS_AUTO_REPORTING + #if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE) suspend_auto_report = false; #endif } diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index bb56eaf91..deb3c09d4 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -40,7 +40,7 @@ GcodeSuite gcode; #include "../feature/mixing.h" #endif -#include "../Marlin.h" // for idle() +#include "../Marlin.h" // for idle() and suspend_auto_report uint8_t GcodeSuite::target_extruder; millis_t GcodeSuite::previous_cmd_ms; @@ -749,7 +749,7 @@ void GcodeSuite::process_next_command() { void GcodeSuite::host_keepalive() { const millis_t ms = millis(); static millis_t next_busy_signal_ms = 0; - if (host_keepalive_interval && busy_state != NOT_BUSY) { + if (!suspend_auto_report && host_keepalive_interval && busy_state != NOT_BUSY) { if (PENDING(ms, next_busy_signal_ms)) return; switch (busy_state) { case IN_HANDLER: