Skip to content

Commit

Permalink
Macros: round before comparing in bed mesh sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Dec 27, 2024
1 parent 46a5de7 commit a4d91a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configuration/macros/mesh.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ gcode:

{% if printer.configfile.settings.beacon is defined and beacon_contact_start_print_true_zero %}
{% set zero_ref_pos = printer.configfile.settings.bed_mesh.zero_reference_position %}
{% if zero_ref_pos is not defined or zero_ref_pos[0] != safe_home_x or zero_ref_pos[1] != safe_home_y %}
CONSOLE_ECHO TYPE="error" TITLE="Zero reference position does not match safe home position" MSG="Please update your bed mesh zero reference position in printer.cfg, like so:_N__N_[bed_mesh]_N_zero_reference_position: {safe_home_x},{safe_home_y}_N_"
{% if zero_ref_pos is not defined or zero_ref_pos[0]|float|round != safe_home_x|float|round or zero_ref_pos[1]|float|round != safe_home_y|float|round %}
CONSOLE_ECHO TYPE="error" TITLE="Zero reference position does not match safe home position" MSG="Please update your bed mesh zero reference position in printer.cfg, like so:_N__N_[bed_mesh]_N_zero_reference_position: {safe_home_x|float|round},{safe_home_y|float|round}_N_"
_STOP_AND_RAISE_ERROR MSG="Zero reference position does not match safe home position"
{% endif %}
{% endif %}
Expand Down

0 comments on commit a4d91a5

Please sign in to comment.