<p>The correct Marlin-command to unpause seems to be <code>setUserConfirmed()</code>. I have tested that it works.</p>

CC BY-SA 4.0
2021-02-15T14:47:17.070Z
2021-02-15T14:47:17.070Z
dotswe
<p>A print that is paused with an <code>M0</code> can be unpaused with <code>M108</code>.
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 <code>M0</code> in the G-code.
I tried <code>injectCommands_P(PSTR(&quot;M108\n&quot;));</code> in the code, but it did not work. Perhaps I should not have a new-line at the end of it.</p>
<p>What is the correct command to do this?</p>
<pre><code>void GcodeSuite::M108() {
  TERN_(HAS_RESUME_CONTINUE, wait_for_user = false);
  wait_for_heatup = false;
}
</code></pre>
<p>Above is the Marlin code for <code>M108</code>. Would be great if someone could decipher what TERN means.</p>

CC BY-SA 4.0
2021-02-14T23:05:48.110Z
TERN is short for "Ternary Macro". [Scroll down on this web page to find what it is used for](https://marlinfw.org/docs/development/coding_standards.html). Basically, this is an if-then statement.
0scar
CC BY-SA 4.0
2021-02-15T10:25:12.497Z
under pause, the next line of G-code isn't read
Trish
<marlin>
How to programmatically resume a paused print in Marlin
dotswe
# How to programmatically resume a paused print in Marlin

(Asked by: username_0 on 2021-02-14)

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.

**Tags:** marlin

> **Comments:**
> **username_1**: TERN is short for "Ternary Macro". [Scroll down on this web page to find what it is used for](https://marlinfw.org/docs/development/coding_standards.html). Basically, this is an if-then statement.  
> **username_2**: under pause, the next line of G-code isn't read  

---

## 1 answers

### Answer by username_0 on 2021-02-15. Score: 2 | Accepted answer

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


---

