From 5ee1087959f88dc60386ff3caa21e75d9e20b128 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 Jan 2021 22:32:12 -0600 Subject: [PATCH] Ignore M22 during SD print --- Marlin/src/gcode/sd/M21_M22.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/src/gcode/sd/M21_M22.cpp b/Marlin/src/gcode/sd/M21_M22.cpp index 77df751fc..a618bc0be 100644 --- a/Marlin/src/gcode/sd/M21_M22.cpp +++ b/Marlin/src/gcode/sd/M21_M22.cpp @@ -35,6 +35,10 @@ void GcodeSuite::M21() { card.mount(); } /** * M22: Release SD Card */ -void GcodeSuite::M22() { card.release(); } +void GcodeSuite::M22() { + + if (!IS_SD_PRINTING()) card.release(); + +} #endif // SDSUPPORT