From b0e175415822ca48935799c834cae86e8d62c2d5 Mon Sep 17 00:00:00 2001 From: Sergey Date: Thu, 2 Dec 2021 18:06:23 +0300 Subject: [PATCH] m992 report only when printing --- Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp b/Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp index caa3f4a18d..c6ff36474c 100644 --- a/Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp +++ b/Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp @@ -75,8 +75,10 @@ void mks_m992(void){ uint16_t minutes = (duration_sec - hours*3600) / 60; uint16_t seconds = (duration_sec - hours*3600 - minutes*60); - sprintf((char *)buffer, "M992 %02d:%02d:%02d\r\n", hours, minutes, seconds); - mks_wifi_out_add((uint8_t *)buffer,strlen(buffer)); + if(CardReader::isPrinting()){ + sprintf((char *)buffer, "M992 %02d:%02d:%02d\r\n", hours, minutes, seconds); + mks_wifi_out_add((uint8_t *)buffer,strlen(buffer)); + }; } void mks_m994(void){