From 8a5f6b6dd955697811a587b450c28ee29347b444 Mon Sep 17 00:00:00 2001 From: MangaValk Date: Mon, 19 Oct 2026 16:15:03 +0200 Subject: [PATCH] PA calibration: lower test flow for TPU/TPE _PA_CFG.material_max_volumetric lowers MAX_VOLUMETRIC for materials that cannot extrude 25 mm3/s (tpu, tpe, flex: 8). The calibration line shows the flow used. Co-Authored-By: Claude Opus 5.5 --- macros/pressure_advance/bd_pa_spoolman.cfg | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/macros/pressure_advance/bd_pa_spoolman.cfg b/macros/pressure_advance/bd_pa_spoolman.cfg index 49177b0..6d6efb5 100644 --- a/macros/pressure_advance/bd_pa_spoolman.cfg +++ b/macros/pressure_advance/bd_pa_spoolman.cfg @@ -191,6 +191,10 @@ variable_fallback_nozzle_temp: 260 # bd_pressure PA_CALIBRATE parameters -- tune to your printer/filament. # See https://pandapi3d.cn/bdpressure/home for guidance on these values. variable_max_volumetric: 25 +# Lower test flow (mm3/s) for materials that cannot extrude max_volumetric: +# soft TPU buckles or slips in the extruder at 25. A key contained in the +# lane's material (any case) applies; with several matches the lowest wins. +variable_material_max_volumetric: {"tpu": 8, "tpe": 8, "flex": 8} variable_acc_wall: 5000 variable_travel_speed: 300 variable_acc_to_decel_factor: 50 @@ -452,8 +456,15 @@ gcode: {% set lane_temp = lane_obj.extruder_temp|default(0, true)|float %} {% set target = printer.extruder.target|default(0)|float %} {% set nozzle_temp = lane_temp if lane_temp > 0 else (target if target > 0 else cfg.fallback_nozzle_temp|float) %} + {% set material = lane_obj.material|default("", true)|string|lower %} + {% set vol = namespace(max=cfg.max_volumetric|float) %} + {% for key, flow in cfg.material_max_volumetric.items() %} + {% if key in material and flow|float < vol.max %} + {% set vol.max = flow|float %} + {% endif %} + {% endfor %} - {action_respond_info("Calibrating PA for %s (spool %d) at %.0fC..." % (lane, spool_id, nozzle_temp))} + {action_respond_info("Calibrating PA for %s (spool %d) at %.0fC, %g mm3/s..." % (lane, spool_id, nozzle_temp, vol.max))} M117 Calibrating PA: {lane} G1 Z50 F3000 @@ -462,7 +473,7 @@ gcode: G4 P400 G1 Z0 F3000 G4 P400 - PA_CALIBRATE NOZZLE_TEMP={nozzle_temp} MAX_VOLUMETRIC={cfg.max_volumetric} ACC_WALL={cfg.acc_wall} TRAVEL_SPEED={cfg.travel_speed} ACC_TO_DECEL_FACTOR={cfg.acc_to_decel_factor} + PA_CALIBRATE NOZZLE_TEMP={nozzle_temp} MAX_VOLUMETRIC={vol.max} ACC_WALL={cfg.acc_wall} TRAVEL_SPEED={cfg.travel_speed} ACC_TO_DECEL_FACTOR={cfg.acc_to_decel_factor} # IMPORTANT: we do NOT read printer.extruder.pressure_advance # here. Klipper fully evaluates a macro's Jinja2 template