I have been doing a lot of resonance testing. I have also been doing a lot of changing things in my cfg, restarting Klipper, and then running more resonance tests.
Every time I have to restart Klipper the first time I perform accelerometer_query or test_resonances, I get an error message:
Invalid adxl345 id (got 0 vs e5). This is generally indicative of connection problems (e.g. faulty wiring) or a faulty adxl345 chip.
What I want to do is create a macro for resonance testing that will:
- call an existing conditional homing macro
- accelerometer_query
- if there is an error and it matches the one shown above, swallow the error message and repeat the accelerometer query
- if the error appears again, stop and actually bother the user
- run the actual test_resonances command
- run another macro I wrote that creates the chart and moves the csv and the chart to a directory where I can easily access them
I can do all of this except for the part about swallowing the error. My current macro just stops immediately whenever Klipper throws an error.
I have tried some searches, but I can’t seem to come up with the right combination of search terms.
Anyway, thanks for reading and double-thanks if you are able to provide some help.