A print that is paused with an M0 can be unpaused with M108. That works with my Chiron running Marlin However, it also has a display that uses its' own serial protocol to communicate with Marlin. I want that display to be able to unpause my printer when it has encountered M0 in the G-code. I tried injectCommands_P(PSTR("M108\n")); in the code, but it did not work. Perhaps I should not have a new-line at the end of it.

What is the correct command to do this?

void GcodeSuite::M108() {
  TERN_(HAS_RESUME_CONTINUE, wait_for_user = false);
  wait_for_heatup = false;

Above is the Marlin code for M108. Would be great if someone could decipher what TERN means.

  • $\begingroup$ TERN is short for "Ternary Macro". Scroll down on this web page to find what it is used for. Basically, this is an if-then statement. $\endgroup$
    – 0scar
    Feb 14 at 23:05
  • $\begingroup$ under pause, the next line of G-code isn't read $\endgroup$
    – Trish
    Feb 15 at 10:25
  • $\begingroup$ Please accept your own answer as the solution by checking the ✔️ next to the answer, accepting your own answer is possible after 48 hours after posting. $\endgroup$
    – 0scar
    Feb 16 at 23:22

The correct Marlin-command to unpause seems to be setUserConfirmed(). I have tested that it works.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.