mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-08 14:34:06 -06:00
Deploying to gh-pages from @ Klipper3d/klipper@282d1113e4 🚀
This commit is contained in:
parent
efb3cae53c
commit
eae17df752
168 changed files with 4934 additions and 554 deletions
|
@ -1314,8 +1314,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="Sponsors.md" class="md-nav__link">
|
||||
None
|
||||
<a href="Sponsors.html" class="md-nav__link">
|
||||
Sponsors
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -1532,19 +1532,8 @@ gcode:
|
|||
|
||||
<h3 id="the-rawparams-variable">The "rawparams" variable<a class="headerlink" href="#the-rawparams-variable" title="Permanent link">¶</a></h3>
|
||||
<p>The full unparsed parameters for the running macro can be access via the <code>rawparams</code> pseudo-variable.</p>
|
||||
<p>This is quite useful if you want to change the behavior of certain commands like the <code>M117</code>. For example:</p>
|
||||
<div class="highlight"><pre><span></span><code>[gcode_macro M117]
|
||||
rename_existing: M117.1
|
||||
gcode:
|
||||
{% if rawparams %}
|
||||
{% set escaped_msg = rawparams|replace('"', '\\"') %}
|
||||
SET_DISPLAY_TEXT MSG="{escaped_msg}"
|
||||
RESPOND TYPE=command MSG="{escaped_msg}"
|
||||
{% else %}
|
||||
SET_DISPLAY_TEXT
|
||||
{% endif %}
|
||||
</code></pre></div>
|
||||
|
||||
<p>Note that this will include any comments that were part of the original command.</p>
|
||||
<p>See the <a href="https://github.com/Klipper3d/klipper/blob/master/config/sample-macros.cfg">sample-macros.cfg</a> file for an example showing how to override the <code>M117</code> command using <code>rawparams</code>.</p>
|
||||
<h3 id="printer">"printer"变量<a class="headerlink" href="#printer" title="Permanent link">¶</a></h3>
|
||||
<p>可以通过<code>printer</code> 的pseudo-variable来检查(和变更)打印机的当前状态。比如说:</p>
|
||||
<div class="highlight"><pre><span></span><code>[gcode_macro slow_fan]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue