From 0ea659c4ce23ae78e67d18ec4b4ebe46823ece3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Wed, 12 Jun 2024 22:33:48 +0200 Subject: [PATCH] fixed undefined jinja variables when calling from the WebUI --- shaketune/dummy_macros.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shaketune/dummy_macros.cfg b/shaketune/dummy_macros.cfg index 5ee0185..99a2501 100644 --- a/shaketune/dummy_macros.cfg +++ b/shaketune/dummy_macros.cfg @@ -29,7 +29,7 @@ gcode: "Z_HEIGHT": z_height if z_height is not none else '', "ACCEL_CHIP": accel_chip if accel_chip is not none else '' } %} - _EXCITATE_AXIS_AT_FREQ {% for key, value in params_filtered.items() if value is not none and value != '' %}{key}={value} {% endfor %} + _EXCITATE_AXIS_AT_FREQ {% for key, value in params_filtered.items() if value is defined and value is not none and value != '' %}{key}={value} {% endfor %} [gcode_macro AXES_MAP_CALIBRATION] @@ -59,7 +59,7 @@ gcode: "TRAVEL_SPEED": travel_speed, "Z_HEIGHT": z_height if z_height is not none else '' } %} - _COMPARE_BELTS_RESPONSES {% for key, value in params_filtered.items() if value is not none and value != '' %}{key}={value} {% endfor %} + _COMPARE_BELTS_RESPONSES {% for key, value in params_filtered.items() if value is defined and value is not none and value != '' %}{key}={value} {% endfor %} [gcode_macro AXES_SHAPER_CALIBRATION] @@ -85,7 +85,7 @@ gcode: "TRAVEL_SPEED": travel_speed, "Z_HEIGHT": z_height if z_height is not none else '' } %} - _AXES_SHAPER_CALIBRATION {% for key, value in params_filtered.items() if value is not none and value != '' %}{key}={value} {% endfor %} + _AXES_SHAPER_CALIBRATION {% for key, value in params_filtered.items() if value is defined and value is not none and value != '' %}{key}={value} {% endfor %} [gcode_macro CREATE_VIBRATIONS_PROFILE]