PA_CALIBRATE_ALL_LANES: skip lanes without filament

Lanes whose AFC prep and load sensors do not both see filament are
skipped with a message, as are names that are not AFC lanes. The
"complete" message is now a RESPOND, so it appears after the
calibrations instead of before them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-14 15:17:20 +02:00
1 parent 536db5836d
commit ec1f67e455
1 file changed
+9 -2
+9 -2
View File
@@ -557,11 +557,18 @@ gcode:
{action_respond_info("PA_CALIBRATE_ALL_LANES starting for: %s" % raw_lanes)} {action_respond_info("PA_CALIBRATE_ALL_LANES starting for: %s" % raw_lanes)}
{% for lane in lane_list %} {% for lane in lane_list %}
{% set lane = lane.strip() %} {% set lane = lane.strip() %}
{% if lane != "" %} {% set obj = "AFC_stepper " ~ lane %}
{% if lane == "" %}
{% elif obj not in printer %}
RESPOND MSG="PA_CALIBRATE_ALL_LANES: {lane} is not an AFC lane, skipped"
{% elif not (printer[obj].prep and printer[obj].load) %}
RESPOND MSG="PA_CALIBRATE_ALL_LANES: {lane} has no filament loaded, skipped"
{% else %}
LANE_CALIBRATE_PA LANE={lane} FORCE={force} LANE_CALIBRATE_PA LANE={lane} FORCE={force}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{action_respond_info("PA_CALIBRATE_ALL_LANES complete.")} # RESPOND runs in order, after the calibrations above
RESPOND MSG="PA_CALIBRATE_ALL_LANES complete."
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------