Skip to content

Commit

Permalink
Macros: mandatory START_PRINT parameter sanity check (Rat-OS#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeKeck authored Dec 27, 2024
1 parent 2c06523 commit e58fa38
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions configuration/macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,17 @@ variable_initial_tool: 0 # internal use only. Do not touch!
variable_extruder_first_layer_temp: "" # internal use only. Do not touch!
variable_extruder_other_layer_temp: "" # internal use only. Do not touch!
gcode:
# mandatory parameter sanity check
{% if params.EXTRUDER_TEMP is not defined %}
{ action_raise_error("Missing START_PRINT parameter. EXTRUDER_TEMP parameter not found.")}
{% endif %}
{% if params.EXTRUDER_OTHER_LAYER_TEMP is not defined %}
{ action_raise_error("Missing START_PRINT parameter. EXTRUDER_OTHER_LAYER_TEMP parameter not found.")}
{% endif %}
{% if params.BED_TEMP is not defined %}
{ action_raise_error("Missing START_PRINT parameter. BED_TEMP parameter not found.")}
{% endif %}

# in case VAOC calibration is still active end it
{% if "xyz" in printer.toolhead.homed_axes and printer["dual_carriage"] is defined and printer["gcode_macro _VAOC"] is defined %}
{% if printer["gcode_macro _VAOC"].is_started|default(true)|lower == 'true' %}
Expand Down

0 comments on commit e58fa38

Please sign in to comment.