I suggest to use "G27 P0" (Parking Nozzle only Z if it is below parking distance). So the print will be aborted (because WirelessPrinting does not send more commands to the printer) and the printer put the Nozzle in a safe position.
I suggest an easy option to use like a #define as Marlin have. Because not all printers have the G27 command enabled and by default M112 can still be used.
Edit: It is more complicated than that. But I will test it.
I suggest to use "G27 P0" (Parking Nozzle only Z if it is below parking distance). So the print will be aborted (because WirelessPrinting does not send more commands to the printer) and the printer put the Nozzle in a safe position. I suggest an easy option to use like a #define as Marlin have. Because not all printers have the G27 command enabled and by default M112 can still be used.
Edit: It is more complicated than that. But I will test it.