Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filament_switch_sensor: runout distance, smart and runout gcode #158

Merged
merged 7 commits into from
Apr 1, 2024

Conversation

Zeanon
Copy link
Contributor

@Zeanon Zeanon commented Feb 19, 2024

Added a runout_distance parameter to filament switch sensors which means that after a filament_switch sensor triggers the printer will print for another x mm of filament (if your sensor sits at the end of a reverse bowden tube)

Filament sensor parameters can now be set via command (If you run a reverse bowden between motion sensor and extruder and retract after a print, there will be a buffer in the bowden which means you intially need a higher detection length than you would need while printint, now you can adjust it on the fly)

Added smart parameter to the sensors:
normally the sensor class uses the idle_timeout sttatus to determine whether the printer is printing, which also tiggers of you just move the toolhead (leading to false positives)
if smart is set to 1, it will use the virtual_sd_card module to determine the state, leading to no false positives but making the sensor not trigger when printing via usb stream

(Of course there are mainsail UI changes for this as well, which I will happily provide if requested :))

Copy link
Contributor

@bwnance bwnance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks really good, thank you! just a couple things.

Could you also clean the PR up? Sorry it's taken us this long to get to it! (Ideally the PR should just have the relevant changes in it, not a bunch of other commits, as it does now)

klippy/extras/filament_switch_sensor.py Show resolved Hide resolved
klippy/extras/filament_switch_sensor.py Outdated Show resolved Hide resolved
klippy/extras/filament_motion_sensor.py Show resolved Hide resolved
klippy/extras/filament_switch_sensor.py Show resolved Hide resolved
@Zeanon
Copy link
Contributor Author

Zeanon commented Mar 23, 2024

I cleaned up the commit history and I hope I resolved all your comments
I have tested the new merged SET_FILAMENT_SENSOR command on my machine but obviously I havent had time to test it as thouroughly as before, so some feedback would be appreciated :)

@rogerlz rogerlz changed the title Runout distance filament_switch_sensor: runout distance Mar 30, 2024
@rogerlz rogerlz self-requested a review March 30, 2024 12:31
Copy link
Contributor

@rogerlz rogerlz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good. please do a new real-world testing and it is ready to be merged

@rogerlz rogerlz changed the title filament_switch_sensor: runout distance filament_switch_sensor: runout distance, smart and runout gcode Mar 30, 2024
rogerlz
rogerlz previously approved these changes Mar 30, 2024
@Zeanon
Copy link
Contributor Author

Zeanon commented Mar 31, 2024

For now all commands worked without issues, I guess I'll test it for some days and then report back so we can be sure that everything is definitely working

@rogerlz rogerlz requested a review from bwnance April 1, 2024 23:57
@rogerlz rogerlz merged commit 6dd863c into DangerKlippers:master Apr 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants