File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,21 @@ gcode:
5555 (safe_max_y - safe_min_y) * probe_count_scale )
5656 | round(0) | int %}
5757 {% set y_probes = ((y_probes, probe_min_count)|max, max_y_probes)|min %}
58+ # Add probes for bicubic if one axis has too many probes for lagrange.
59+ {% if x_probes > 6 and y_probes < 4 %}
60+ {% set y_probes = 4 %}
61+ {% elif y_probes > 6 and x_probes < 4 %}
62+ {% set x_probes = 4 %}
63+ {% endif %}
5864 {% set probe_count = [x_probes,y_probes] %}
5965 {% endif %}
6066 {% set dummy = params.__setitem__(" MESH_MIN" , mesh_min_x~" ," ~mesh_min_y) %}
6167 {% set dummy = params.__setitem__(" MESH_MAX" , mesh_max_x~" ," ~mesh_max_y) %}
6268 {% set dummy = params.__setitem__(" PROBE_COUNT" , probe_count|join(' ,' )) %}
69+ # Force bicubic if we've exceeded the max for lagrange.
70+ {% if probe_count[0]|int > 6 or probe_count[1]|default(0)|int > 6 %}
71+ {% set dummy = params.__setitem__(" ALGORITHM" , " bicubic" ) %}
72+ {% endif %}
6373 {% endif %}
6474 {% if printer[" gcode_macro bed_mesh_calibrate" ].km_override|default(False) %}
6575 {% set calibrate_cmd = " _km_bed_mesh_calibrate_base" %}
You can’t perform that action at this time.
0 commit comments