Frix-x / klippain

Generic Klipper configuration for 3D printers
GNU General Public License v3.0
849 stars 221 forks source link

Rework of the ERCF integration #198

Closed Frix-x closed 1 year ago

Frix-x commented 1 year ago

Hi @Benoitone, @elpopo-eng and @Surion79 :)

As there was some work done by each of you in Klippain regarding the ERCF, I'm opening this issue to synchronise things a little bit. Now that Ette ERCF system is not evolving more and that moggieuk took the lead on the future of ERCF with Ette approval, I would like to fully rework the ERCF Klippain's integration to make it more aligned with the current state of Klippain and be more future proof :)

  1. First thing to do is to remove all the current ERCF macros and integrations to avoid getting duplicate and complicated mechanisms to handle both at the same time.
  2. Then as a first step of developpement, I eard that HH have an install script and that everything should "almost just work correctly". So we could add a dummy config file included in the printer.cfg for ERCF. This file would set the internal Klippain "ercf_enabled" variable. Then in the startup check macro, we could check for "if there is ercf_enabled, then check if there is also the HH printer.ercf.enabled variable set". If it's not the case, then error out to stop Klipper start and warn the user that to use an ERCF he should install HH by himslef.
  3. Then we should add all the things needed to make it work better in Klippain's macros as the START_PRINT things, etc...
Surion79 commented 1 year ago

What kind of ercf are you using? I am using unmodded ercf with mellow fly can board and HH 1.2.4 with HH Klipperscreen. Buffer solution was ercp but that is not reliable for me. Looking currently at pika and the quiver

Surion79 commented 1 year ago

@Frix-x do you want to create a branch for us regarding ercf integration? So we can PR to it independently to hypercare of v4

Surion79 commented 1 year ago

dummyconfig i would place in a subfolder ercf with name ercf.cfg and do includes ../ercf_hardware.cfg etc to original file location of the install script and with setting ercf_enabledd

clientmacros is a different topic

Benoitone commented 1 year ago

@Frix-x do you want to create a branch for us regarding ercf integration? So we can PR to it independently to hypercare of v4

maybe it's a good idea...

Benoitone commented 1 year ago

What kind of ercf are you using? I am using unmodded ercf with mellow fly can board and HH 1.2.4 with HH Klipperscreen. Buffer solution was ercp but that is not reliable for me. Looking currently at pika and the quiver

i actualy use unmodded v1.1 ercf too (except the encoder... i use the Binky Encoder) with Tircow easy board ,HH and HH Klipperscreen too. I use ERCP buffer because i have them from my first v1.0 ERCF...

Frix-x commented 1 year ago

Ok, I'll create this branch based on develop. I think the work is not that hard and could be done in a couple of days. So I'll wait for it to be merged in v4 before the release. In the meantime, I'll work myself on the Swithcwire and multikinematic PR :)

Frix-x commented 1 year ago

Feel free to PR on https://github.com/Frix-x/klippain/tree/ercf-rework

I'll see if I can give you some contributor rights to let you push directly to the branch without using your fork : it will be more efficient :) EDIT: done! Welcome to you in the Klippain team! Feel free to push commits to the branch you want (you can create them as you want), excepted main and develop that are protected and require a pull-request to get code pushed to them :)

Surion79 commented 1 year ago

i commented all ercf macro calls with ### since most of them are kinda required in the end and we can verify type and placement of them more easily if we have a "visual" anchor. I reworked the ercf.cfg already and removed the ercf macro file. My currently idea is to use the output files of HappyHare like installed via install.sh in root folder for now. i do hope that it is possible to place such "huge" mod like ERCF in a subfolder in the config folder of klipper. but this would only work if the install script of HH is modified. Another topic for later :D just that you understand how i approach this

Benoitone commented 1 year ago

The include you put in ercf.cfg will not work because of the symlink 🥲 you must add them in a file in printer_data like printer.cfg that will unfortunately not be updated automatically. It would be too easy otherwise 😋

Surion79 commented 1 year ago

damn, thats sad! :D

Surion79 commented 1 year ago

and if we symlink them in klippain to the ercf folder? would that work?

Surion79 commented 1 year ago

in the branch i commented everything of ercf out and "reworked" it. stuff i don't understand, i kept commented out, so this should be discussed.

Surion79 commented 1 year ago

so the commits can be discussed individually

Surion79 commented 1 year ago

apart of the symlink issue we should discuss possible workarounds, the rest should be sufficient to run ercf HH software IMO. (but i guess the devil is in the detail :) )

Frix-x commented 1 year ago

Closing as Klippain v4 is merged and released :)