3DPrintDemon / Demon_Klipper_Essentials_Unified

The very latest UNIFIED version for these macros! Huge re-implementation & new Features!
GNU General Public License v3.0
190 stars 13 forks source link

User hooks in macros #58

Open sermayoral opened 3 days ago

sermayoral commented 3 days ago

Hi friend! I have recently discovered this repository, and I love it! I think it's super powerful and it's wonderfully done. Congratulations!

I would like to propose an improvement that I find very interesting. It involves allowing the user to add custom macro code to some of the most important macros, RatOS style.

Imagine that a user, after finishing a filament unload, wanted to hear a BEEP, maybe to send an MQTT message to his home server to perform some automation.

RatOS does this by defining a series of user macros that are called from these important macros, and which are initially empty. This way, if a user wants to add some action to that macro, he would just have to redefine that user macro in his my_macros.cfg file and do whatever he wants. See https://os.ratrig.com/docs/configuration/macros/#user-macro-hooks, https://github.com/Rat-OS/RatOS-configuration/blob/v2.1.x/macros/user-hooks.cfg and https://github.com/Rat-OS/RatOS-configuration/blob/v2.1.x/macros.cfg

¿What do you think about it? Of course I could do the coding and make a PR, but I wanted to tell you about it first and get your opinion.

Thank you very much for everything :-)

3DPrintDemon commented 3 days ago

Hi, welcome onboard & thank you! I'm so glad you're enjoying my work!

Now that is a very cool suggestion, I think that'll work great for extended user customisation! I'll get to work on something & try to implement it for the next update! Could be very exciting!

sermayoral commented 3 days ago

Well thank you so much. You are very kind. If you need help with anything, just let me know. I look forward to the next update :-)