diff --git a/macros/pressure_advance/bd_pa_spoolman.cfg b/macros/pressure_advance/bd_pa_spoolman.cfg index 00443b3..19b27ad 100644 --- a/macros/pressure_advance/bd_pa_spoolman.cfg +++ b/macros/pressure_advance/bd_pa_spoolman.cfg @@ -557,11 +557,18 @@ gcode: {action_respond_info("PA_CALIBRATE_ALL_LANES starting for: %s" % raw_lanes)} {% for lane in lane_list %} {% 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} {% endif %} {% endfor %} - {action_respond_info("PA_CALIBRATE_ALL_LANES complete.")} + # RESPOND runs in order, after the calibrations above + RESPOND MSG="PA_CALIBRATE_ALL_LANES complete." # ---------------------------------------------------------------------------