diff --git a/README.md b/README.md index 3884337..dc40b7e 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ everything below, grouped by topic. Comment out what you do not use there. | **afc/** | | | | `xy_safety_check.cfg` | `AFC_XY_SAFETY_CHECK`, `_AFC_STORE_HOME_REFERENCE`, `AFC_XY_RESUME`: lost-step check around tool changes | `extras/xy_drift.py` (CoreXY) | | `lane_tools.cfg` | `LANE_FEED_UNTIL_HUB_OPEN`, `LANE_FEED_ABORT` | AFC | -| `purge_check.cfg` | `BLOBIFIER_CHECKED`: checks every AFC purge with bd_pressure (and optionally bdwidth motion) | Blobifier, AFC, `extras/bdpressure_check.py` + bd_pressure load-check firmware, `extras/bdwidth_status.py` | +| `purge_check.cfg` | `BLOBIFIER_CHECKED`: checks every AFC purge with bd_pressure (and optionally bdwidth motion); a bd_pressure that does not answer fails the check, `PURGE_CHECK_IGNORE_SENSOR` lets the current print finish without it | Blobifier, AFC, `extras/bdpressure_check.py` + bd_pressure load-check firmware, `extras/bdwidth_status.py` | | `purge_until_empty.cfg` | `PURGE_UNTIL_EMPTY`: purges a snapped filament out until there is no more nozzle pressure | same as `purge_check.cfg` | | **pressure_advance/** | | | | `bd_pa_spoolman.cfg` + `bd_pa_*.sh` | `LANE_CALIBRATE_PA`, `PA_CALIBRATE_ALL_LANES`, `LANE_RECAL_PA`, `SET_SPOOL_ID`, `PA_STATUS`: pressure advance per lane/spool, cached locally and in Spoolman; a calibration with no result, a pause during the test or too few/stuck sensor readings is rejected and not saved | bd_pressure, AFC, Spoolman, `gcode_shell_command` | diff --git a/macros/afc/purge_check.cfg b/macros/afc/purge_check.cfg index 69a9dae..c1707b5 100644 --- a/macros/afc/purge_check.cfg +++ b/macros/afc/purge_check.cfg @@ -32,7 +32,10 @@ [bdwidth_status] sensor: fila_width_0 -# Remove this section if bdpressure_check.py is not installed +# Remove this section if bdpressure_check.py is not installed. With it +# installed, a bd_pressure that does not answer (stock firmware, hung or +# unplugged sensor) fails the check, so in enforce mode every purge pauses; +# PURGE_CHECK_IGNORE_SENSOR lets the current print finish without it. [bdpressure_check] sensor: bd_pa @@ -50,6 +53,7 @@ variable_bdwidth_warmup_ms: 15000 variable_start_counts: 0 variable_start_e: 0.0 variable_last_failed: False # last check failed in enforce mode (read by _RESUME_PURGE_VERIFY) +variable_ignore_missing_sensor: False # set by PURGE_CHECK_IGNORE_SENSOR, cleared at print end gcode: [gcode_macro BLOBIFIER_CHECKED] @@ -144,8 +148,15 @@ gcode: {% if p.longest_ms < cfg.pressure_min_ms %} {% set _ = failed.append("no sustained nozzle pressure") %} {% endif %} + {% elif 'bdpressure_check' in printer %} + {% if cfg.ignore_missing_sensor %} + {% set press = "pressure skipped: bd_pressure not answering (ignored, PURGE_CHECK_IGNORE_SENSOR)" %} + {% else %} + {% set press = "bd_pressure not answering" %} + {% set _ = failed.append("bd_pressure not answering (power-cycle the sensor, or PURGE_CHECK_IGNORE_SENSOR to finish this print without the check)") %} + {% endif %} {% else %} - {% set press = "pressure skipped (no check firmware)" %} + {% set press = "pressure skipped (no bdpressure_check)" %} {% endif %} {% set checked = motion_on or 'bdpressure_check' in printer and printer.bdpressure_check.available %} {% set verdict = 'FAIL: ' ~ failed|join(', ') if failed else ('OK' if checked else 'NOTHING CHECKED') %} @@ -156,3 +167,14 @@ gcode: PAUSE ; no effect while already paused (resume purge): see _RESUME_PURGE_VERIFY {% endif %} {% endif %} + +[gcode_macro PURGE_CHECK_IGNORE_SENSOR] +description: Let purges pass without bd_pressure until the print ends (ENABLE=0 to undo) +gcode: + {% if params.ENABLE|default(1)|int %} + SET_GCODE_VARIABLE MACRO=_PURGE_CHECK_CFG VARIABLE=ignore_missing_sensor VALUE=True + RESPOND MSG="PURGE_CHECK: an unavailable bd_pressure is ignored until the print ends (purges are not checked for pressure then)" + {% else %} + SET_GCODE_VARIABLE MACRO=_PURGE_CHECK_CFG VARIABLE=ignore_missing_sensor VALUE=False + RESPOND MSG="PURGE_CHECK: an unavailable bd_pressure fails the check again" + {% endif %} diff --git a/macros/print/print_start_end.cfg b/macros/print/print_start_end.cfg index 858e78c..f34b1bf 100644 --- a/macros/print/print_start_end.cfg +++ b/macros/print/print_start_end.cfg @@ -257,6 +257,9 @@ gcode: M221 S100 BED_MESH_CLEAR SET_SKEW CLEAR=1 + {% if 'gcode_macro _PURGE_CHECK_CFG' in printer %} + SET_GCODE_VARIABLE MACRO=_PURGE_CHECK_CFG VARIABLE=ignore_missing_sensor VALUE=False + {% endif %} # Retract/unretract that is remembered across prints and restarts. # Klipper's G10 only retracts once until a G11, and nothing sends G11 here,