From c2741affe9ce6edcfc0d35558ddf924c86d42e34 Mon Sep 17 00:00:00 2001 From: Sebastiaan Dammann Date: Tue, 27 Apr 2021 01:32:13 +0200 Subject: [PATCH] Make Cancel Objects reporting optional (#21698) --- Marlin/Configuration_adv.h | 3 +++ Marlin/src/feature/cancel_object.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 1a10244e5..8cfaa9578 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3641,6 +3641,9 @@ * Implement M486 to allow Marlin to skip objects */ //#define CANCEL_OBJECTS +#if ENABLED(CANCEL_OBJECTS) + #define CANCEL_OBJECTS_REPORTING // Emit the current object as a status message +#endif /** * I2C position encoders for closed loop control. diff --git a/Marlin/src/feature/cancel_object.cpp b/Marlin/src/feature/cancel_object.cpp index 1f92ac584..ee5716888 100644 --- a/Marlin/src/feature/cancel_object.cpp +++ b/Marlin/src/feature/cancel_object.cpp @@ -43,7 +43,7 @@ void CancelObject::set_active_object(const int8_t obj) { else skipping = false; - #if HAS_STATUS_MESSAGE + #if BOTH(HAS_STATUS_MESSAGE, CANCEL_OBJECTS_REPORTING) if (active_object >= 0) ui.status_printf_P(0, PSTR(S_FMT " %i"), GET_TEXT(MSG_PRINTING_OBJECT), int(active_object)); else