1
$\begingroup$

A print that is paused with an M0 can be unpaused with M108. That works with my Chiron running Marlin 2.0.7.2. 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.

$\endgroup$
3
  • $\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, 2021 at 23:05
  • $\begingroup$ under pause, the next line of G-code isn't read $\endgroup$
    – Trish
    Feb 15, 2021 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, 2021 at 23:22

1 Answer 1

2
$\begingroup$

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

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .