From 3664d29b2138d43784543220c31eb10751054b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 20 Aug 2022 16:27:30 +0000 Subject: [PATCH] PFW-1386 Add M709 --- Firmware/Marlin_main.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index decac3d7f..04a94d7be 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -8654,6 +8654,38 @@ Sigma_Exit: } break; + /*! + ### M709 - MMU turn on/off/reset + The MK3S cannot not power off the MMU, for that reason the functionality is not supported. + #### Usage + + M709 [ X ] + + M709 X0 - issue an X0 command via communication into the MMU (soft reset) + M709 X1 - toggle the MMU's reset pin (hardware reset) + + #### Parameters + - `X` - Reset MMU + */ + case 709: + { + if (MMU2::mmu2.Enabled() && code_seen('X')) + { + switch (code_value_uint8()) + { + case 0: + MMU2::mmu2.Reset(MMU2::MMU2::Software); + break; + case 1: + MMU2::mmu2.Reset(MMU2::MMU2::ResetPin); + break; + default: + break; + } + } + } + break; + /*! ### M999 - Restart after being stopped M999: Restart after being stopped by error @todo Usually doesn't work. Should be fixed or removed. Most of the time, if `Stopped` it set, the print fails and is unrecoverable.