Update freedi_hall_filament_width_sensor.py#482
Update freedi_hall_filament_width_sensor.py#482andreykurichev wants to merge 1 commit intoPhil1988:masterfrom
Conversation
|
I'm on mobile and I cannot easily check, but wasn't the freedi_hall module a modified version of the original hall_filament module? Have you checked what mainline klipper did with the module? |
|
@benlye can you have a check for this as your printer seems to have a working z-offset setup and you did the recent changes? |
@Phil1988 - Different module - my change was to auto_z (which I don't actually use as I have a Cartographer), this is to the filament sensor. @andreykurichev - does the current FreeDi version break in a specific Klipper build? Just wondering how I can test/verify your change? |
|
The commented line should be removed. |
|
@benlye The current version of freedi stops working with version 0.13.0-554 |
|
I tried this out with Klipper 0.13.0-557 on my Q1 Pro. The sensor now always reports that there is filament, even when there is not. It was working correctly with the old code on a slightly older Klipper build (0.13.0-536). |
|
I copied the recent changes made to the upstream See what I did here: |
|
FWIW, I'm going to work on a PR to mainline Klipper to add a configuration option for I have some testing to do, but this is what I've done: It's a simple config setting to default flow compensation to |
|
PR submitted - Klipper3d/klipper#7210 |
Key changes:
The _setup_adc_callbacks() method now tries 3 connections:
· Option 1: New API with 3 arguments: (time, self, callback)
· Option 2: Medium API with 2 arguments: (time, callback)
· Option 3: Your existing option with 1 argument: (callback)
The method tries each option in the queue, and as soon as one is implemented (without raising a TypeError), it uses it.
If none of them work, a clear error is thrown.
What happens now:
Old versions (with one argument): setup_adc_callback(callback)
Medium versions (with two arguments): setup_adc_callback(time, callback)
New versions (with multiple arguments): setup_adc_callback(time, self, callback)
The module should now work on any version of Klipper.