Stop using bdwidth while printing, work without it
bdwidth's motion reading stays at 0, its per-reading width compensation made the flow jump between 77 and 119%, and a USB dropout shut down Klipper. PRINT_START no longer enables it. _PRINT_CLEANUP, BLOBIFIER_CHECKED and PURGE_UNTIL_EMPTY only send bdwidth commands when [bdwidth fila_width_0] exists, and bdwidth_status reports present: False with neutral values when it is not configured, so the section can be removed from printer.cfg. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
76172fbc4f
commit
93f00c87a7
6 files changed
+28
-14
No files matched your search
@@ -26,6 +26,9 @@
|
||||
# only starts reading on the first SET_BDWIDTH ... ENABLE
|
||||
# linear_motion - counts per mm (motion_linear_coefficient)
|
||||
# sample_time - seconds between sensor reads
|
||||
# present - False when no [bdwidth <sensor>] is configured; the
|
||||
# other fields then hold neutral defaults, so macros keep
|
||||
# working with bdwidth removed from the config
|
||||
# usb_ok - False while the USB connection is down (port: usb)
|
||||
# usb_errors - USB read errors since Klipper start
|
||||
#
|
||||
@@ -54,7 +57,10 @@ class BDWidthStatus:
|
||||
self._handle_connect)
|
||||
|
||||
def _handle_connect(self):
|
||||
self.sensor = self.printer.lookup_object(self.sensor_name)
|
||||
self.sensor = self.printer.lookup_object(self.sensor_name, None)
|
||||
if self.sensor is None:
|
||||
logging.info("bdwidth_status: no [%s] configured", self.sensor_name)
|
||||
return
|
||||
if (getattr(self.sensor, 'port', None) == 'usb'
|
||||
and callable(getattr(self.sensor, 'Read_bdwidth', None))
|
||||
and getattr(self.sensor, 'usb', None) is not None):
|
||||
@@ -96,6 +102,11 @@ class BDWidthStatus:
|
||||
|
||||
def get_status(self, eventtime):
|
||||
s = self.sensor
|
||||
if s is None:
|
||||
return {'name': self.name, 'present': False, 'reading': False,
|
||||
'enabled': False, 'total_move': 0, 'last_motion': 0,
|
||||
'diameter': 0., 'active': 'disable', 'linear_motion': 42.8,
|
||||
'sample_time': 1., 'usb_ok': True, 'usb_errors': 0}
|
||||
# bdwidth's own get_status() is the runout helper's, which carries
|
||||
# the SET_FILAMENT_SENSOR enable flag
|
||||
try:
|
||||
@@ -110,6 +121,7 @@ class BDWidthStatus:
|
||||
and 'disable' not in str(getattr(s, 'is_active', 'disable')))
|
||||
return {
|
||||
'name': self.name,
|
||||
'present': True,
|
||||
'reading': reading,
|
||||
'enabled': enabled,
|
||||
'total_move': getattr(s, 'actual_total_move', 0),
|
||||
|
||||
Reference in new issue
Block a user