Skip to content

Commit

Permalink
Macros: fix priming.cfg error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt authored Sep 26, 2024
1 parent ea218f4 commit f0e1957
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions macros/priming.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ gcode:
{% set start_z_probe_result_t0 = printer["gcode_macro RatOS"].probe_for_priming_result|float(9999.9) %}
{% set end_z_probe_result_t0 = printer["gcode_macro RatOS"].probe_for_priming_end_result|float(9999.9) %}
{% if printer.configfile.settings.bltouch is not defined and printer.configfile.settings.probe is not defined and printer.configfile.settings.beacon is not defined %}
{ action_raise_error("No probe or bltouch section found. Adaptive priming only works with [probe] or [bltouch].") }
{ action_raise_error("No probe or bltouch section found. Adaptive priming only works with [probe], [beacon] or [bltouch].") }
{% endif %}
{% if start_z_probe_result_t0 == 9999.9 %}
{ action_raise_error("No start probe result found for prime area. This is likely a bug.") }
Expand All @@ -365,10 +365,10 @@ gcode:
{% endif %}
{% set adjustment_threshold = printer["gcode_macro RatOS"].adaptive_prime_offset_threshold|float %}
{% if start_z_probe_result_t0 < adjustment_threshold %}
{ action_raise_error("Abnormal probe offset detected. Needed offset of {start_adjustment} is below the offset threshold of -1mm. Please verify the probe is over the bed when probing for priming. If it isn't, you should adjust you min/max bed_mesh settings so the probe is always over the print area.") }
{ action_raise_error("Abnormal probe offset detected. Needed offset of %.5f is below the offset threshold of -1mm. Please verify the probe is over the bed when probing for priming. If it isn't, you should adjust you min/max bed_mesh settings so the probe is always over the print area." % (start_z_probe_result_t0) ) }
{% endif %}
{% if end_z_probe_result_t0 < adjustment_threshold %}
{ action_raise_error("Abnormal probe offset detected. Needed offset of {end_adjustment} is below the offset threshold of -1mm. Please verify the probe is over the bed when probing for priming. If it isn't, you should adjust you min/max bed_mesh settings so the probe is always over the print area.") }
{ action_raise_error("Abnormal probe offset detected. Needed offset of %.5f is below the offset threshold of -1mm. Please verify the probe is over the bed when probing for priming. If it isn't, you should adjust you min/max bed_mesh settings so the probe is always over the print area." % (end_z_probe_result_t0) ) }
{% endif %}
{% set start_z_offset = start_z_probe_result_t0 %}
{% set end_z_offset = end_z_probe_result_t0 %}
Expand All @@ -380,7 +380,7 @@ gcode:
{% set start_z_probe_result_t1 = printer["gcode_macro RatOS"].probe_for_priming_result_t1|float(9999.9) %}
{% set end_z_probe_result_t1 = printer["gcode_macro RatOS"].probe_for_priming_end_result_t1|float(9999.9) %}
{% if printer.configfile.settings.bltouch is not defined and printer.configfile.settings.probe is not defined and printer.configfile.settings.beacon is not defined %}
{ action_raise_error("No probe or bltouch section found. Adaptive priming only works with [probe] or [bltouch].") }
{ action_raise_error("No probe or bltouch section found. Adaptive priming only works with [probe], [beacon] or [bltouch].") }
{% endif %}
{% if start_z_probe_result_t1 == 9999.9 %}
{ action_raise_error("No start probe result found for prime area. This is likely a bug.") }
Expand All @@ -390,10 +390,10 @@ gcode:
{% endif %}
{% set adjustment_threshold = printer["gcode_macro RatOS"].adaptive_prime_offset_threshold|float %}
{% if start_z_probe_result_t1 < adjustment_threshold %}
{ action_raise_error("Abnormal probe offset detected. Needed offset of {start_adjustment} is below the offset threshold of -1mm. Please verify the probe is over the bed when probing for priming. If it isn't, you should adjust you min/max bed_mesh settings so the probe is always over the print area.") }
{ action_raise_error("Abnormal probe offset detected. Needed offset of %.5f is below the offset threshold of -1mm. Please verify the probe is over the bed when probing for priming. If it isn't, you should adjust you min/max bed_mesh settings so the probe is always over the print area." % (start_z_probe_result_t1) ) }
{% endif %}
{% if end_z_probe_result_t1 < adjustment_threshold %}
{ action_raise_error("Abnormal probe offset detected. Needed offset of {end_adjustment} is below the offset threshold of -1mm. Please verify the probe is over the bed when probing for priming. If it isn't, you should adjust you min/max bed_mesh settings so the probe is always over the print area.") }
{ action_raise_error("Abnormal probe offset detected. Needed offset of %.5f is below the offset threshold of -1mm. Please verify the probe is over the bed when probing for priming. If it isn't, you should adjust you min/max bed_mesh settings so the probe is always over the print area." % (end_z_probe_result_t1) ) }
{% endif %}
{% set start_z_offset = [start_z_offset, start_z_probe_result_t1]|max %}
{% set end_z_offset = [end_z_offset, start_z_probe_result_t1]|max %}
Expand Down Expand Up @@ -501,4 +501,4 @@ gcode:
RESTORE_TOOLHEAD_SETTINGS KEY="prime_blob"

# Reset extrusion distance
G92 E0
G92 E0

0 comments on commit f0e1957

Please sign in to comment.