ballaswag / guppyscreen

A native Touch UI for 3D Printers running Klipper/Moonraker.
GNU General Public License v3.0
237 stars 25 forks source link

GUPPY_BELTS_SHAPER_CALIBRATION Crashing Klipper on K1C #104

Open sleewok opened 5 months ago

sleewok commented 5 months ago

Attempting to run GUPPY_BELTS_SHAPER_CALIBRATION on the K1C frequently crashes Klipper. The errors range from MCU timeouts to move queue overflow (this one most often). It crashes after running the testing frequency for BELT B during the testing of BELT A. The crash is triggered because the MCU is overloaded as it is attempting to output the raw CSV data while simultaneously testing the other BELT.

I have verified this be splitting up the macro into separate tests for BELT A and BELT B, allowing for the csv to finish writing before running the test on the next belt.

To fix this the macro needs to wait for the CSV file to finish outputting before continuing to test the next belt. If that is not possible, then the macro should be split up and require each step run in order.

I am running Guppy Screen nightly-7c169647c78cd0c746b8dc3cae06ac3205e3fba8.

Let me know what additional information you might need.

consp commented 5 months ago

A crash like this is a memory starvation or cpu cycle starvation issue, same as on the FF Ad5m (in case of memory). Your idea that it needs to wait is a valid solution for thos problem.