Skip to content

Commit

Permalink
📝 G27 P3 / P4
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Nov 9, 2023
1 parent 2aaa0c4 commit dc1c702
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 108 deletions.
26 changes: 18 additions & 8 deletions _gcode/G027.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,42 @@ tag: g027
title: Park toolhead
brief: Park the current toolhead

experimental: true
author: jbrazio
contrib: thinkyhead
since: 1.1.0
requires: NOZZLE_PARK_FEATURE
group: nozzle

codes: [ G27 ]

notes:
- Requires `NOZZLE_PARK_FEATURE`.
- The park position is defined by `NOZZLE_PARK_POINT`.
- The parking XY position and Z value are defined by `NOZZLE_PARK_POINT`.
- The minimum Z raise is defined by `NOZZLE_PARK_Z_RAISE_MIN`.

parameters:
-
tag: P
since: 2.0.0
optional: true
description: 'Z axis action'
description: Parking behavior
values:
-
tag: 0
description: If current Z-pos is lower than Z-park then the nozzle will be raised to reach Z-park height
description: (Default) Relative raise by `NOZZLE_PARK_Z_RAISE_MIN` before XY parking. In this case `NOZZLE_PARK_POINT.z` is used as the _minimum_ Z park position.
-
tag: 1
description: No matter the current Z-pos, the nozzle will be raised/lowered to reach Z-park height
description: Absolute move to `NOZZLE_PARK_POINT.z` before XY parking. _This may move the nozzle down, so use with caution!_
-
tag: 2
description: The nozzle height will be raised by Z-park amount but never going over the machine's limit of `Z_MAX_POS`
description: Relative raise by `NOZZLE_PARK_POINT.z` before XY parking.
-
tag: 3
since: 2.2.0
description: Relative raise by `NOZZLE_PARK_Z_RAISE_MIN`, skip XY parking.
-
tag: 4
since: 2.2.0
description: No Z raise. Just XY parking.

examples:
-
Expand All @@ -40,4 +50,4 @@ examples:

---

Park the nozzle at a predefined XYZ position.
Raise and park the nozzle according to a predefined XY position and Z raise (or minimum height) value.
194 changes: 95 additions & 99 deletions _includes/gcode-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,45 +72,43 @@ <h3>Usage</h3>
{% if gcode.parameters %}
{% assign list = ('' | split: '|') %}
{% for parm in gcode.parameters %}
{% if parm.tag %}
{% assign list = list | push: parm %}
{% endif %}
{% 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 %}
{% 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>
Expand All @@ -131,64 +129,66 @@ <h4>Parameters</h4>
{% 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 class="arg">
{%- 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 -%}
<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.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 %}
{{- 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 %}
{%- for pv in parm.values -%}
{%- if pv.description -%}
<li>
{%- if pv.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> {{ pv.since }}</span></span>{% endif %}
<code>{{ parm.tag }}{{ pv.tag }}</code>: {{ pv.description | markdownify -}}
</li>
{%- endif -%}
{%- endfor -%}
</ul>
{% endif %}
{%- endif -%}
</td>
</tr>
{% endfor %}
{%- endfor -%}
</tbody>
</table>
</div>
</div>
{% endif %}
{% endif %}
{%- endif %}

{% if gcode.images %}
<div class="col-lg-12 row gallery" id="gallery-{{ gcode.tag }}">
Expand All @@ -215,24 +215,20 @@ <h3>Related Media</h3>
{% if gcode.examples %}{% assign ex = gcode.examples %}
{% elsif gcode.example %}{% assign ex = gcode.example %}
{% else %}{% assign ex = false %}{% endif %}
{% if ex %}
{% if ex -%}
<div class="col-lg-12 row examples">
<h3>Example{% if ex[1] %}s{% endif %}</h3>
{% for item in ex %}
{% if item.pre %}
{% for line in item.pre %}
{{ line | markdownify }}
{% endfor %}
{% endif %}
{% highlight gcode %}{% for line in item.code %}{{ line }}
{% endfor %}{% endhighlight %}
{% if item.post %}
{%- for item in ex -%}
{%- if item.pre -%}
{%- for line in item.pre -%}{{ line | markdownify }}{%- endfor -%}
{%- endif -%}
{%- highlight gcode -%}{% for line in item.code %}{{ line }}
{% endfor %}{% endhighlight -%}
{%- if item.post -%}
<div class="post">
{% for line in item.post %}
{{ line | markdownify }}
{% endfor %}
{%- for line in item.post -%}{{ line | markdownify }}{%- endfor -%}
</div>
{% endif %}
{% endfor %}
{%- endif -%}
{%- endfor -%}
</div>
{% endif %}
{%- endif %}
12 changes: 11 additions & 1 deletion _sass/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,17 @@ div.highlight { margin-bottom: 25px; }
padding: 1em;
> p { margin: 0; }
}
.param-desc-list p { display: inline; }
.param-desc-list {
p { display: inline; }
li {
position: relative;
span.label-success {
position: absolute;
left: -7em;
top: 2px;
}
}
}
td.arg code { white-space: nowrap; }
#search-block-form .button { margin-right: 0.25em; }

Expand Down

0 comments on commit dc1c702

Please sign in to comment.