diff --git a/extras/bdpressure_check.py b/extras/bdpressure_check.py index e2d38cc..a360c2b 100644 --- a/extras/bdpressure_check.py +++ b/extras/bdpressure_check.py @@ -2,7 +2,7 @@ # # Uses the I2C connection the existing [bdpressure ] section already # set up. Before writing anything it reads the extension marker (bytes -# 54-55 = 0xBD 0x01). On stock firmware the marker is missing and every +# 54-55 = 0xBD + version 1 or 2). On stock firmware the marker is missing and every # command only reports "not available": nothing is written, because # writing past the stock register table would land in the sensor's RAM. # @@ -27,8 +27,12 @@ REG_EXT = 54 # first byte of the extension REG_CTRL = 56 -EXT_LEN = 12 # bytes 54-65 -EXT_MAGIC = (0xBD, 0x01) +EXT_LEN = 12 # bytes 54-65, the same in version 1 and 2 +EXT_MAGIC = 0xBD +# Version 2 (load-check firmware 20261015 and later) only adds diagnostics +# at 66-71. Accepting only version 1 made the purge check report the sensor +# as not answering after the firmware update. +EXT_VERSIONS = (1, 2) class BDPressureCheck: @@ -62,7 +66,8 @@ class BDPressureCheck: self.status['available'] = False return False data = bytearray(self.i2c.i2c_read([REG_EXT], EXT_LEN)['response']) - if len(data) < EXT_LEN or tuple(data[0:2]) != EXT_MAGIC: + if (len(data) < EXT_LEN or data[0] != EXT_MAGIC + or data[1] not in EXT_VERSIONS): self.status['available'] = False return False u16 = lambda i: data[i] | (data[i + 1] << 8) diff --git a/macros/print/print_start_end.cfg b/macros/print/print_start_end.cfg index 6e806cf..6a52a67 100644 --- a/macros/print/print_start_end.cfg +++ b/macros/print/print_start_end.cfg @@ -108,6 +108,16 @@ gcode: {% else %} RESPOND MSG="Chamber heating: loading and purging {ns.lane} ({new.material}, {tool}) before the chamber heats" {% endif %} + # The Blobifier only purges with the QGL applied: without it AFC + # loaded the lane and skipped the purge. Level now (PRINT_START + # levels again on the soaked bed) and home Z after it. + {% if printer.quad_gantry_level and not printer.quad_gantry_level.applied %} + _GUARD_ON PHASE=warmup_qgl + QUAD_GANTRY_LEVEL + _GUARD_ON PHASE=warmup_z_home + G28 Z + _GUARD_OFF + {% endif %} M109 S{temps|max} {tool} _LOAD_FOR_CHAMBER_VERIFY LANE={ns.lane}