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

Adding callback for gcode responses. #1290

Closed
wants to merge 1 commit into from
Closed

Adding callback for gcode responses. #1290

wants to merge 1 commit into from

Conversation

Stephan3
Copy link
Contributor

A basic callback for gcode executuion. It is usefull for lcds, paneldue, webapi and or webinterfaces.

Signed-off-by: Stephan stephan.oelze@gmail.com

… beside pseudotty.

Signed-off-by: Stephan <stephan.oelze@gmail.com>
@john--
Copy link
Contributor

john-- commented Feb 20, 2019

Oh hey, looks familiar :)

@Stephan3
Copy link
Contributor Author

@KevinOConnor
Copy link
Collaborator

Thanks. At a high-level, my feedback is that an infrastructure commit like this should be accompanied by the commits that make use of the infrastructure change. So, for example, if you plan to submit a series of commits that add dwc support to Klipper, then this would be a good commit to include in that series. Otherwise, it's very difficult to review the particulars of an infrastructure change without a user of that infrastructure.

-Kevin

@Stephan3
Copy link
Contributor Author

@KevinOConnor thanks for the feedback.
The DWC is working great so far. I plan to merge it to klipper, of course. Today i make changes nearly everyday to match users needs and things i missed. When it becomes a "ready state" i will send a PR here.
( after changing tabs to spaces BTW :D )

Theese 4 lines of code wont hurt and it gives current dwc/paneldue users the ability to use klippers master branch. Maybe you take a few minutes and give the webif a try. On both sides, klipper and dwc, there are no more changes needed to keep this one maintainable.(beside this one here)

@Stephan3
Copy link
Contributor Author

#1312

@KevinOConnor
Copy link
Collaborator

Any update on DWC progress?

-Kevin

@Stephan3
Copy link
Contributor Author

Stephan3 commented Apr 2, 2019

dwc2 is running great so far and i have some userfeedback. Personally i use it daytoday. there are 2 points left on my list, i will take care of. for now i will close that one here.

@Stephan3 Stephan3 closed this Apr 2, 2019
@rafaljot
Copy link

@Stephan3 I have been testing dwc2-for-klipper module for several months. I think it is good enough to add to Klipper.
My $20 Banana Pi Zero + EINSYRambo is ready to operate with full web interface in 11s
This is unachievable for OctoPrint
It's annoying that I have to correct these four lines of Klipper's code every time I make upgrade.

@matyasf
Copy link

matyasf commented Sep 12, 2019

++ for merging this change. It could help others too who want a frontend for Klipper. So I'd consider it more as a part of Klipper API than a change needed for a specific library

@manu7irl
Copy link

manu7irl commented Dec 10, 2019

@KevinOConnor could you please have a look here, and instruct what is needed to merge DWC2 to klipper? And to use it as an alternative UI.
I am myself made an install script for it:
[https://github.com/manu7irl/klipper-DWC2-installer]
so everytime I upgrade klipper I got also the changes added automatically.
DWC2 is amazing so far, on my orangepi H2+ 512mb ram + zram and swap file.
No issues to report, it is incredibly responsive! almost 6 months in a row.
Also got another instance of klipper running on my manjaro celeron core2duo 2.66Ghz Lenovo x200 laptop 4gb ram, again no issues so far

@KevinOConnor
Copy link
Collaborator

As with all Klipper features, a developer would need to submit the feature and address any questions or issues found during a review.

-Kevin

@marcosscriven
Copy link

So far as I understand it, the PR here was simply adding the ability to hook in other tools.

However, @KevinOConnor demands that DWC control integration is added?

A unit test is all that’s needed to ensure the callback API works, with perhaps some exception handling wrapping the call.

It seems a little mean spirited to me.

@john--
Copy link
Contributor

john-- commented May 10, 2020

@marcosscriven I don't think Kevin ever tries to be mean spirited.
It's incredibly hard to be the owner of a project and to please everyone.
Stephan's DWC2 port is something that a lot of people have had success with, but there are fundamental issues with the implementation of it.
IIRC it is invoking klipper routines from a background thread. 99% of the time things will appear fine, but when things don't work it makes it incredible difficult to debug. From what I've read, there have been strange issues reported in the main klipper repo, where people have had DWC2 enabled.
So this is isn't as trivial as Kevin just being too "mean spirited" to merge something.

Kevin's actually been actively working with developers like @Arksine on implementing a proper Web API / interface for Klipper that's done in a way that's robust and maintainable. There's a great video here on the progress: https://www.youtube.com/watch?v=fQIutqzxOzE It's written from the ground up for klipper.

@marcosscriven
Copy link

To be clear, I think it’s absolutely fine to tell people that using a third party tool with Klipper means you don’t get support with that tool. You use DWC, or anything else, with Klipper, and you’re on your own.

I don’t think it fair to not merge in a simple hook, for over a year, or demand that someone else’s code that uses it must become part of the Klipper repository.

@DanielJoyce
Copy link
Contributor

Instead of waiting for a merge for a simple callback system, dwc2 4 klipper could simply subclass the class it wants to use and extend it with the needed methods. This is unlikely to break in the future unless Kevin does some massive refactoring. The changes look simple enough.

My big complaint about dwc2 for klipper is it is one giant python file that should be broken down further.

@marcosscriven
Copy link

The title of the PR is "Adding callback for gcode responses" - It's about third-party code having a mechanism to hook in.

I've neither tried DWC, nor seen its code - but came here when I saw the installation method required patching Klipper.

@KevinOConnor's first comment was:

Thanks. At a high-level, my feedback is that an infrastructure commit like this should be accompanied by the commits that make use of the infrastructure change. So, for example, if you plan to submit a series of commits that add dwc support to Klipper, then this would be a good commit to include in that series.

Why should DWC support need to be added to Klipper? The principle of allowing tools to be hooked in can be covered by a unit test, and external calls can be bulletproofed if necessary with exception handling.

@manu7irl
Copy link

we have a new extra module for DWC2 that is not taping into the gcode.py file.
and works with the new GcodeCommand class,
web_dwc2.txt
I think it can be worth to have a look at it...

@marcosscriven
Copy link

On reflection - it was mean spirited of me to say that about @KevinOConnor. Please accept my apologies.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants