Inline manage_inactivity, tweak autoreport_paused

This commit is contained in:
Scott Lahteine
2020-02-20 20:09:37 -06:00
parent 2b788e9aa6
commit a1f026f57a
7 changed files with 41 additions and 28 deletions

View File

@ -28,6 +28,8 @@
unified_bed_leveling ubl;
#include "../../../MarlinCore.h"
#include "../../../module/configuration_store.h"
#include "../../../module/planner.h"
#include "../../../module/motion.h"
@ -151,9 +153,7 @@
* 4: Compact Human-Readable
*/
void unified_bed_leveling::display_map(const int map_type) {
#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
suspend_auto_report = true;
#endif
const bool was = gcode.set_autoreport_paused(true);
constexpr uint8_t eachsp = 1 + 6 + 1, // [-3.567]
twixt = eachsp * (GRID_MAX_POINTS_X) - 9 * 2; // Leading 4sp, Coordinates 9sp each
@ -229,9 +229,7 @@
SERIAL_EOL();
}
#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
suspend_auto_report = false;
#endif
set_gcode.set_autoreport_paused(was);
}
bool unified_bed_leveling::sanity_check() {