Add klipper support for changing filament #1359
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, it's a simple implementation to allow custom gcode to disable the extruder. Using Klipper, M18 would disable all steppers, ignoring arguments.
At first I had added a "klipper support" checkbox into Settings, however I then chose to implement it just like the babystepping option, for the sake of consistency and flexibility. So I added a 'disableExtruderGCode' key, changable in the config.json (default value is 'M18 E'). For Klipper I use "SET_STEPPER_ENABLE STEPPER=extruder ENABLE=0", I can confirm it works (tried @Pause and M0/M1).
Just a note. I had to downgrade electron-store to 6 (can't read config.json otherwise) and electron to 9 ("tilted" display otherwise) to get interface working (even before my changes, on clean setup). Of course I reverted dependencies to original values before commit. I don't know if these are known issues or I did something wrong.
This is my first PR too, hope I did everything right.