joakimtoe / KlipperLCD

A simple LCD service that enables the Neptune 3 Pro LCD screen with Klipper
Apache License 2.0
73 stars 11 forks source link

Adding a default value for displaying max_accel_to_decel #12

Open Joldiges opened 6 months ago

Joldiges commented 6 months ago

max_accel_to_decel is being deprecated from Klipper and is being included in fewer and fewer default printer.cfg's accordingly.

The proposed is a hot-fix to allow KlipperLCD to run on machines without max_accel_to_decel in the config.

The implemented uses the get function of the dictionary type so that a default value can be retrieved if it doesn't exist within the dict.

(image of KlipperLCD crashing, without the changes) image

(adding a pic of the code, I don't know why :) ) For Some Reason, I'm adding a picture of my code too

(image showing KlipperLCD not crashing) image

SWRJEEDOM commented 1 month ago

Great, it works perfectly