Purge check: accept load-check firmware v2; chamber load levels first
- bdpressure_check.py accepted only extension version 1. The sensor now runs firmware version 2 (bytes 54-65 unchanged, diagnostics added), so every purge check reported bd_pressure as not answering. Accept 1 and 2. - _LOAD_FOR_CHAMBER: the Blobifier only purges with the QGL applied, so the load before the chamber soak skipped its purge (0.0 mm extruded). Level the gantry and home Z first when the QGL is not applied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b9d2f3a062
commit
0b1b2a6947
2 files changed
+19
-4
No files matched your search
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Uses the I2C connection the existing [bdpressure <name>] 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)
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user