Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gcode-info.html « _includes - github.com/MarlinFirmware/MarlinDocumentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f9ccf43ea9767f5a9f82e923f06cc76f000bd9fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
{% for cat in page.category %}
  {% if cat == 'needs-review' %}
    <div class="col-lg-12 row">
      {% alert info %}
This document has been marked `needs-review`. The following information may be outdated or may no longer apply to the latest Marlin.
      {% endalert %}
    </div>
  {% endif %}
{% endfor %}

<div class="col-lg-12 row meta" id="gcode-header">
  <p class="text-right pull-right visible-lg-block hidden-print small custom-pt25">
    {% assign authors = gcode.author | append: ',' | append: gcode.contrib | replace: " ","" | split: ',' %}
    {% if authors %}
      {% for author in authors %}
        <a href="//github.com/{{ author }}" data-toggle="tooltip" data-placement="bottom" title="Visit {{ author }}'s profile on Github">{% avatar user=author size=30 %}</a>
      {% endfor %}
    {% endif %}
  </p>

  <h1>{{ gcode.codes | codes_desc }} - {{ gcode.title }}</h1>

  {% if gcode.experimental %}
    <span class="label label-warning"><span data-toggle="tooltip" data-placement="bottom" title="Experimental feature"><i class="fa fa-flask" aria-hidden="true"></i></span></span>
  {% endif %}

  {% if gcode.since %}
    <span class="label label-success"><span data-toggle="tooltip" data-placement="bottom" title="Available since"><i class="fa fa-code" aria-hidden="true"></i>
    {{ gcode.since }}</span></span>
  {% endif %}

  {% if gcode.group %}
    <span class="label label-default"><i class="fa fa-tags" aria-hidden="true"></i>
    {{ gcode.group }}</span>
  {% endif %}

  {% if gcode.brief %}
    <span class="label label-primary"><i class="fa fa-pencil-square" aria-hidden="true"></i> {{gcode.brief}}</span>
  {% endif %}

  {% if gcode.requires %}
    {% assign list = (gcode.requires | split: ',') %}
    {% for item in list %}
      <span class="label label-requires">{{item}}</span>
    {% endfor %}
  {% endif %}
</div>

{% if gcode.related %}
  <div class="col-lg-12 row related">
    Related codes: {% for item in gcode.related %}<a href="/docs/gcode/{{ item | linkify }}.html"><code>{{item}}</code></a> {% endfor %}
  </div>
{% endif %}

<div class="col-lg-12 row long">
  <h3>Description</h3>
  {% if page.content %}{{ page.content | markdownify }}{% endif %}
</div>

{% if gcode.notes %}
  <div class="col-lg-12 row notes">
    <h3>Notes</h3>
      {% for line in gcode.notes %}{{ line | markdownify }}{% endfor %}
  </div>
{% endif %}

{% if gcode.devnotes %}
  <div class="col-lg-12 row devnotes">
    <h3>Developer Notes</h3>
      {% for line in gcode.devnotes %}{{ line | markdownify }}{% endfor %}
  </div>
{% endif %}

{% if gcode.pagetype != 'toc' %}
<div class="col-lg-12 row usage" id="usage-{{ gcode.tag }}">
  <h3>Usage</h3>
  {% for code in gcode.codes %}
  <div><code>{{ code }}
    {% if gcode.parameters %}
      {% assign list = ('' | split: '|') %}
      {% for parm in gcode.parameters %}
        {% if parm.tag %}
          {% assign list = list | push: parm %}
        {% endif %}
      {% endfor %}

      {% if list.size > 0 %}
        {% assign list = (list | sort: 'tag') %}
        {% for parm in list %}<!--
        --><span {% if parm.optional %}class="optional" {% endif %}data-toggle="tooltip" data-container="body" data-placement="top" data-original-title="{{ parm.description | markdownify | strip_html }}"><!--
          -->{% if parm.optional %}&#x5B;{% endif %}<!--
            -->{{ parm.tag }}<!--
            -->{% if parm.values.size > 0 %}<!--
              -->{% if parm.values.size == 1 %}<!--
                -->{% assign pv = parm.values[0] %}<!--
                -->{% if pv.type != 'flag' %}<!--
                  -->{% if pv.optional %}&#x5B;{% else %}&lt;{% endif %}<!--
                  -->{% if pv.tag %}<!--
                    -->{{ pv.tag }}{% if pv.unit %} ({{ pv.unit }}){% endif %}<!--
                  -->{% elsif pv.unit %}<!--
                    -->{{ pv.unit }}<!--
                  -->{% elsif pv.type %}<!--
                    -->{{ pv.type }}<!--
                  -->{% else %}<!--
                    -->Unknown<!--
                  -->{% endif %}<!--
                  -->{% if pv.optional %}&#x5D;{% else %}&gt;{% endif %}<!--
                -->{% endif %}<!--
              -->{% else %}<!--
                -->&lt;<!--
                -->{% for pv in parm.values %}<!--
                  -->{{ pv.tag }}<!--
                  -->{% if forloop.last != true %}&#x7C;{% endif %}<!--
                -->{% endfor %}<!--
                -->&gt;<!--
              -->{% endif %}<!--
            -->{% endif %}<!--
            -->{% if parm.optional %}&#x5D;{% endif %}<!--
          --></span> <!--
     -->{% endfor %}
      {% endif %}
    {% endif %}
  </code></div>
  {% endfor %}
</div>
{% endif %}

{% if gcode.parameters %}
  {% assign list = ('' | split: '|') %}
  {% for parm in gcode.parameters %}{% if parm.tag %}{% assign list = list | push: parm %}{% endif %}{% endfor %}

  {% if list.size > 0 %}
    <div class="col-lg-12 row params">
      <h4>Parameters</h4>
      <div class="table-responsive">
        <table class="table">
          <tbody>
            {% assign list = (list | sort: 'tag') %}
            {% for parm in list %}
              <tr>
                <td class="arg"><code>
                  {% if parm.optional %}&#x5B;{% endif %}<!--
                  -->{{ parm.tag }}<!--
                  -->{% if parm.values.size > 0 %}<!--
                    -->{% if parm.values.size == 1 %}<!--
                      -->{% assign pv = parm.values[0] %}<!--
                      -->{% if pv.type != 'flag' %}<!--
                        -->{% if pv.optional %}&#x5B;{% else %}&lt;{% endif %}<!--
                        -->{% if pv.tag %}<!--
                          -->{{ pv.tag }}{% if pv.unit %}({{ pv.unit }}){% endif %}<!--
                        -->{% elsif pv.unit %}<!--
                          -->{{ pv.unit }}<!--
                        -->{% elsif pv.type %}<!--
                          -->{{ pv.type }}<!--
                        -->{% else %}<!--
                          -->Unknown<!--
                        -->{% endif %}<!--
                        -->{% if pv.optional %}&#x5D;{% else %}&gt;{% endif %}<!--
                      -->{% endif %}<!--
                    -->{% else %}<!--
                      -->&lt;<!--
                      -->{% for pv in parm.values %}<!--
                        -->{{ pv.tag }}<!--
                        -->{% if forloop.last != true %}&#x7C;{% endif %}<!--
                      -->{% endfor %}<!--
                      -->&gt;<!--
                    -->{% endif %}<!--
                  -->{% endif %}<!--
                  -->{% if parm.optional %}&#x5D;{% endif %}
                </code><!--
                -->{% if parm.since %} <span class="label label-success"><span data-toggle="tooltip" data-placement="bottom" title="Available since"><i class="fa fa-code" aria-hidden="true"></i>{{ parm.since }}</span></span>{% endif %}<!--
                -->{% if parm.requires %}{% assign list = (parm.requires | split: ',') %}<!--
                  -->{% for item in list %}<!--
                    --><span class="label label-requires"><span data-toggle="tooltip" data-placement="bottom" title="Option required">{{item}}</span></span><!--
                  -->{% endfor %}<!--
                -->{% endif %}<!--
                -->{% if parm.experimental %} <span class="label label-warning"><span data-toggle="tooltip" data-placement="bottom" title="Experimental option"><i class="fa fa-flask" aria-hidden="true"></i></span></span>{% endif %}<!--
                --></td>
                <td>
                  {{ parm.description | markdownify }}
                  {% if parm.values.size > 0 %}
                    <ul class="param-desc-list">
                      {% for pv in parm.values %}
                        {% if pv.description %}
                          <li><code>{{ parm.tag }}{{ pv.tag }}</code>: {{ pv.description | markdownify }}</li>
                        {% endif %}
                      {% endfor %}
                    </ul>
                  {% endif %}
                </td>
              </tr>
            {% endfor %}
          </tbody>
        </table>
      </div>
    </div>
  {% endif %}
{% endif %}

{% if gcode.images %}
<div class="col-lg-12 row gallery" id="gallery-{{ gcode.tag }}">
  <h3>Gallery</h3>
  {% for img in gcode.images %}
    {% assign cap = img.caption | markdownify %}
    {% assign ttl = img.title | markdownify | strip_html %}
    <h4>{{ ttl }}</h4>
    {{ cap }}
    <img src="{{ img.path | prepend: '/assets/images/gcode/' }}" alt="{{ ttl | xml_escape }}" title="{{ ttl | xml_escape }}" />
  {% endfor %}
</div>
{% endif %}

{% if gcode.videos %}
<div class="col-lg-12 row videos" id="videos-{{ gcode.tag }}">
  <h3>Related Media</h3>
  {% for videoid in gcode.videos %}
    <iframe class="youtube" width="300" height="225" src="https://youtube.com/embed/{{ videoid }}"></iframe>
  {% endfor %}
</div>
{% endif %}

{% if gcode.examples %}
  {% assign ex = gcode.examples %}
  {% assign plural = "s" %}
{% else %}
  {% if gcode.example %}
    {% assign ex = gcode.example %}
    {% assign plural = "" %}
  {% else %}
    {% assign ex = [] %}
  {% endif %}
{% endif %}

{% if ex %}
  <div class="col-lg-12 row examples">
    <h3>Example{{ plural }}</h3>
    {% for example in ex %}
      {% if example.pre %}
        {% for line in example.pre %}
          {{ line | markdownify }}
        {% endfor %}
      {% endif %}
      {% highlight gcode %}{% for line in example.code %}{{ line }}
{% endfor %}{% endhighlight %}
      {% if example.post %}
        <div class="post">
          {% for line in example.post %}
            {{ line | markdownify }}
          {% endfor %}
        </div>
      {% endif %}
    {% endfor %}
  </div>
{% endif %}