Skip to content

Commit

Permalink
style: reformat BED_MESH_CALIBRATE
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuh committed Feb 20, 2022
1 parent fdaab77 commit 8098089
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions optional/bed_mesh.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,28 @@ gcode:
{% set safe_max_y = bed_mesh.mesh_max.split(",")[1]|float %}

{% if "MESH_MIN" in params %}
{% set mesh_min_x = (params.MESH_MIN.split(",")[0]|float - probe_mesh_padding, safe_min_x)|max %}
{% set mesh_min_y = (params.MESH_MIN.split(",")[1]|float - probe_mesh_padding, safe_min_y)|max %}
{% set mesh_min_x = (params.MESH_MIN.split(",")[0]|float -
probe_mesh_padding, safe_min_x)|max %}
{% set mesh_min_y = (params.MESH_MIN.split(",")[1]|float -
probe_mesh_padding, safe_min_y)|max %}
{% else %}
{% set mesh_min_x = safe_min_x %}
{% set mesh_min_y = safe_min_y %}
{% endif %}
{% if "MESH_MAX" in params %}
{% set mesh_max_x = (params.MESH_MAX.split(",")[0]|float + probe_mesh_padding, safe_max_x)|min %}
{% set mesh_max_y = (params.MESH_MAX.split(",")[1]|float + probe_mesh_padding, safe_max_y)|min %}
{% set mesh_max_x = (params.MESH_MAX.split(",")[0]|float +
probe_mesh_padding, safe_max_x)|min %}
{% set mesh_max_y = (params.MESH_MAX.split(",")[1]|float +
probe_mesh_padding, safe_max_y)|min %}
{% else %}
{% set mesh_max_x = safe_max_x %}
{% set mesh_max_y = safe_max_y %}
{% endif %}

{% set max_x_probes = (params.PROBE_COUNT|default(bed_mesh.probe_count)).split(",")[0]|int %}
{% set max_y_probes = (params.PROBE_COUNT|default(bed_mesh.probe_count)).split(",")[1]|int %}
{% set max_x_probes = (params.PROBE_COUNT |
default(bed_mesh.probe_count)).split(",")[0]|int %}
{% set max_y_probes = (params.PROBE_COUNT |
default(bed_mesh.probe_count)).split(",")[1]|int %}

{% set x_probes = (max_x_probes * (mesh_max_x - mesh_min_x) /
(safe_max_x - safe_min_x) * probe_count_scale)
Expand Down

0 comments on commit 8098089

Please sign in to comment.