Created
March 14, 2025 23:17
-
-
Save pm0u/5de212577f90a6a1554ac6e461cc2a91 to your computer and use it in GitHub Desktop.
G
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gcode_macro G29] | |
variable_k:1 | |
description: Prepare print bed, generate a bed mesh, and apply global Z nozzle offset | |
gcode: | |
_FIND_Z_EQUALS_ZERO # The user must make sure that nothing else homes Z after this call | |
{% if k|int==1 %} | |
BED_MESH_CALIBRATE RUNS=2 PROFILE=kamp | |
BED_MESH_PROFILE LOAD=kamp | |
SAVE_VARIABLE VARIABLE=profile_name VALUE='"kamp"' | |
{% else %} | |
BED_MESH_CALIBRATE RUNS=2 PROFILE=default | |
BED_MESH_PROFILE LOAD=default | |
SAVE_VARIABLE VARIABLE=profile_name VALUE='"default"' | |
SET_GCODE_VARIABLE MACRO=G29 VARIABLE=k VALUE=1 # Reactivate KAMP/Adaptive mode for next time | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment