Frix-x / klippain

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

FR: Expand templating to include stock printers #276

Closed agreen closed 1 year ago

agreen commented 1 year ago

Found Klippain today, and started setting it up for one of my machines to test it (Ender 3 v2) before I put it on my other machines, like my Vorons.

Built a MCU file that can be included in the stock way, started building the main MCU file and other modifications, when I realized - this is a lot of config work for something that's supposed to simplify the config work.

I was able to get the Ender 3 v2 up and running on klipper by just copy/pasting a klipper config file originally, and off to the races. Considering this as a baseline, my suggestion is a template/include arrangement could be setup with the overrides you have going on already for entire machines. I could include in, say, printer.cfg [include config/printers/Ender3_v2] which would in turn include all the necessary MCU config, board type, overrides so the pullup/pulldowns all work. Then if I need to modify anything, I can use/utilize the rest of the templating system to do so. Going to start looking into setting that up myself, but wanted to share this concept/idea for discussion.

Frix-x commented 1 year ago

Hello,

Thank you for the suggestion! Interestingly, Klippain operated in that manner in the past, but we decided to transition towards greater modularity for a variety of reasons.

The enhanced modularity in Klippain now allows users to seamlessly enable or disable modules as they introduce new modifications or make changes to their printers. Even though the Ender3 is a relatively standardized printer, users often make modifications – such as using different sets of motors, MCUs, or wiring configurations. These alterations can render a standard file unsuitable for many. This variability is even more pronounced with DIY printers, as each one is unique due to the individual choices users make when purchasing components.

This is the rationale behind our shift towards modularity, allowing users to tailor Klippain to their specific machines.

However, when installing Klippain, we've streamlined the process to save you time. We provide MCU templates tailored for several of the most common MCUs on the market. During the installation script, simply select the template that most closely matches your MCU as a starting point. From there, you'll only need to uncomment a few lines in printer.cfg and add a few overrides for motor directions. Examples should already be provided in overrides.cfg.

Ultimately, setting up a machine from scratch should only take a few minutes if you utilize the provided templates.