From f0e1957d80c26ef79d6f2a5e9232efddb898f25a Mon Sep 17 00:00:00 2001 From: Mikkel Schmidt Date: Thu, 26 Sep 2024 23:27:34 +0200 Subject: [PATCH] Macros: fix priming.cfg error messages --- macros/priming.cfg | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/macros/priming.cfg b/macros/priming.cfg index d8dc4a4d..794d1f8a 100644 --- a/macros/priming.cfg +++ b/macros/priming.cfg @@ -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.") } @@ -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 %} @@ -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.") } @@ -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 %} @@ -501,4 +501,4 @@ gcode: RESTORE_TOOLHEAD_SETTINGS KEY="prime_blob" # Reset extrusion distance - G92 E0 \ No newline at end of file + G92 E0