Open TheSin- opened 5 months ago
Updated the example for the new method
this plan might be totally flawed, I didn't know Klipper would only let you rename system macros
configparser.Error: Existing command 'TOOL_BEFORE_CHANGE' not found in gcode_macro rename
so I need to make this macros system versions via the toolchanger.py I suspect which I was trying to avoid.
Just putting my notes here as I figure this out, since I'm still new to the Klipper ecosystem
this plan might be totally flawed, I didn't know Klipper would only let you rename system macros
configparser.Error: Existing command 'TOOL_BEFORE_CHANGE' not found in gcode_macro rename
so I need to make this macros system versions via the toolchanger.py I suspect which I was trying to avoid.
Just putting my notes here as I figure this out, since I'm still new to the Klipper ecosystem
This is fixed with the new example now. I'm going to make a PR on klipper-toolchanger to expose before_change_gcode and after_change_gcode as well to go with this one
Everything is tested and 100% working now. Exactly what I was hoping for, LEDs change properly, I can clean on change now, and once I finish wiring I can add runout sensors for each tool and only check the active tool. This does require the changes to klipper-toolchanger for the before/after_change
Thanks for the PR, overall reasonable changes to merge.
Please fix a few nits:
I haven't tested all this yet as I'm at work, but I'll test it once I'm home. I wanted to get this PR in incase I was going in the wrong direction you could tell me before I put more time in on it.
This would allow for macro overrides in a user area so we don't mess with toolchanger.cfg and can keep it in sync with git
Example of my vision
Still want to make an other PR after this one to separate the path into 2 pieces, tool_path, dock_path and have the center marker for tool detection auto happen so that f isn't reused and can be used through out the path instead. it'll be really easy to do. I just didn't want to make this PR too large.