-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run ShakeTune as an in-process Klipper module #100
Conversation
3be91fd
to
f7609c9
Compare
Hello, Thank you very much for this PR. As we already discussed together, it was part of my plans to start working on this so I'm pretty happy with it :) Some quick pre-review comments just for the context:
|
2eb0363
to
d587017
Compare
…h stdout fallback
Hey, A few updates
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much! I think it's a good first step to get something better integrated! I will do some testing on my end to validate that the installation is ok and there are no regressions and I will merge to the develop branch!
Here are some open notes to myself about things that still need to be done for a later commit (or if you want to continue working on this on another PR):
- Remove the SHAKETUNE_POSTPROCESS and declare specialized commands for each graph type that doesn't use argparse.
- Remove the need for
[include K-ShakeTune/*.cfg]
, as I think we can also put it in the plugin folder and load it automatically in the ShakeTune class (as it's done for example in Tmc Autotune for the engine database: https://github.com/andrewmcgr/klipper_tmc_autotune/blob/6463d8ae896193d718563efa39dbc46db881f7fe/autotune_tmc.py#L62-L71). This would simplify the configuration for users and avoid having to symlink anything in their~/printer_data/config
folder. The only section needed would be[shaketune]
. - For even later, the gcode macros could even be implemented directly in Python, but that's not for today as I think it's a bit of work, but at least the previous point about automatic macro loading would allow for a smooth transition when this will be available.
- Modify the motor log parser to not use the actual log, but to access the TMC fields directly from Klipper objects (this is something I find pretty dirty right now, but I had no other solution before your PR).
- Add some variables in the
[shaketune]
section to configure some defaults or allow to change like the result folder, the default used accelerometer name, etc... - Add some clean mechanism in the install script to remove the old venv if found
EDIT: working on it right now. I have something working, just need to finish converting the jinja macros to Python :) |
Possible Issues:
gcode.respond_info
to output the information to the console.print_with_c_locale
prints usinggcode.respond_info
instead of using stdout, I'm not too happy with that patch but I didn't want to make any more heavy changes to files referencing it and I wanted to keep working if invoked from CLI.