fixed undefined jinja variables when calling from the WebUI

This commit is contained in:
Félix Boisselier
2024-06-12 22:33:48 +02:00
parent 8408152093
commit 0ea659c4ce

View File

@@ -29,7 +29,7 @@ gcode:
"Z_HEIGHT": z_height if z_height is not none else '', "Z_HEIGHT": z_height if z_height is not none else '',
"ACCEL_CHIP": accel_chip if accel_chip 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] [gcode_macro AXES_MAP_CALIBRATION]
@@ -59,7 +59,7 @@ gcode:
"TRAVEL_SPEED": travel_speed, "TRAVEL_SPEED": travel_speed,
"Z_HEIGHT": z_height if z_height is not none else '' "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] [gcode_macro AXES_SHAPER_CALIBRATION]
@@ -85,7 +85,7 @@ gcode:
"TRAVEL_SPEED": travel_speed, "TRAVEL_SPEED": travel_speed,
"Z_HEIGHT": z_height if z_height is not none else '' "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] [gcode_macro CREATE_VIBRATIONS_PROFILE]