From a700e6e3e3dd4b449a0d3f7a26a85bfdde795861 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 15 Feb 2025 11:51:00 -0800 Subject: [PATCH] Autocommit from 2025-02-15 11:51:00 Klipper version: v0.12.0-432-gfec3e685c Moonraker version: v0.9.3-36-g1117890 Mainsail version: v2.13.2 --- .moonraker.conf.bkp | 8 ++ KAMP | 1 + KAMP_Settings.cfg | 36 +++++++++ macros.cfg | 185 ++++++++++++++++++++++++++++++++++++++++++++ moonraker-sql.db | Bin 69632 -> 77824 bytes moonraker.conf | 8 ++ printer.cfg | 14 +++- 7 files changed, 249 insertions(+), 3 deletions(-) create mode 120000 KAMP create mode 100644 KAMP_Settings.cfg create mode 100644 macros.cfg diff --git a/.moonraker.conf.bkp b/.moonraker.conf.bkp index 6413a3c..806b21d 100644 --- a/.moonraker.conf.bkp +++ b/.moonraker.conf.bkp @@ -66,3 +66,11 @@ managed_services = subscriptions = octoapp. +[update_manager Klipper-Adaptive-Meshing-Purging] +type = git_repo +channel = dev +path = ~/Klipper-Adaptive-Meshing-Purging +origin = https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git +managed_services = klipper +primary_branch = main + diff --git a/KAMP b/KAMP new file mode 120000 index 0000000..a213608 --- /dev/null +++ b/KAMP @@ -0,0 +1 @@ +/home/nixolas/Klipper-Adaptive-Meshing-Purging/Configuration \ No newline at end of file diff --git a/KAMP_Settings.cfg b/KAMP_Settings.cfg new file mode 100644 index 0000000..55435d5 --- /dev/null +++ b/KAMP_Settings.cfg @@ -0,0 +1,36 @@ +# Below you can include specific configuration files depending on what you want KAMP to do: + +[include ./KAMP/Adaptive_Meshing.cfg] # Include to enable adaptive meshing configuration. +#[include ./KAMP/Line_Purge.cfg] # Include to enable adaptive line purging configuration. +[include ./KAMP/Voron_Purge.cfg] # Include to enable adaptive Voron logo purging configuration. +[include ./KAMP/Smart_Park.cfg] # Include to enable the Smart Park function, which parks the printhead near the print area for final heating. + +[gcode_macro _KAMP_Settings] +description: This macro contains all adjustable settings for KAMP + +# The following variables are settings for KAMP as a whole. +variable_verbose_enable: True # Set to True to enable KAMP information output when running. This is useful for debugging. + +# The following variables are for adjusting adaptive mesh settings for KAMP. +variable_mesh_margin: 0 # Expands the mesh size in millimeters if desired. Leave at 0 to disable. +variable_fuzz_amount: 0 # Slightly randomizes mesh points to spread out wear from nozzle-based probes. Leave at 0 to disable. + +# The following variables are for those with a dockable probe like Klicky, Euclid, etc. # ---------------- Attach Macro | Detach Macro +variable_probe_dock_enable: False # Set to True to enable the usage of a dockable probe. # --------------------------------------------- +variable_attach_macro: 'Attach_Probe' # The macro that is used to attach the probe. # Klicky Probe: 'Attach_Probe' | 'Dock_Probe' +variable_detach_macro: 'Dock_Probe' # The macro that is used to store the probe. # Euclid Probe: 'Deploy_Probe' | 'Stow_Probe' + # Legacy Gcode: 'M401' | 'M402' + +# The following variables are for adjusting adaptive purge settings for KAMP. +variable_purge_height: 0.8 # Z position of nozzle during purge, default is 0.8. +variable_tip_distance: 0 # Distance between tip of filament and nozzle before purge. Should be similar to PRINT_END final retract amount. +variable_purge_margin: 10 # Distance the purge will be in front of the print area, default is 10. +variable_purge_amount: 30 # Amount of filament to be purged prior to printing. +variable_flow_rate: 12 # Flow rate of purge in mm3/s. Default is 12. + +# The following variables are for adjusting the Smart Park feature for KAMP, which will park the printhead near the print area at a specified height. +variable_smart_park_height: 10 # Z position for Smart Park, default is 10. + +gcode: # Gcode section left intentionally blank. Do not disturb. + + {action_respond_info(" Running the KAMP_Settings macro does nothing, it is only used for storing KAMP settings. ")} diff --git a/macros.cfg b/macros.cfg new file mode 100644 index 0000000..4fdd08d --- /dev/null +++ b/macros.cfg @@ -0,0 +1,185 @@ +# This file provides examples of Klipper G-Code macros. The snippets +# in this file may be copied into the main printer.cfg file and +# customized. + +# See docs/Config_Reference.md for a description of parameters. + + +###################################################################### +# Start Print and End Print +###################################################################### + +# Replace the slicer's custom start and end g-code scripts with +# START_PRINT and END_PRINT. See docs/Slicers.md for more information on using these macros. + +[gcode_macro START_PRINT] +gcode: + {% set BED_TEMP = params.BED_TEMP|default(60)|float %} + {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %} + # Start bed heating + M140 S{BED_TEMP} + # Use absolute coordinates + G90 + # Reset the G-Code Z offset (adjust Z offset if needed) + SET_GCODE_OFFSET Z=0.0 + # Home the printer + G28 + # Move the nozzle near the bed + G1 Z5 F3000 + # Move the nozzle very close to the bed + G1 Z0.15 F300 + # Wait for bed to reach temperature + M190 S{BED_TEMP} + # Set and wait for nozzle to reach temperature + M109 S{EXTRUDER_TEMP} + +[gcode_macro END_PRINT] +gcode: + # Turn off bed, extruder, and fan + M140 S0 + M104 S0 + M106 S0 + # Move nozzle away from print while retracting + G91 + G1 X-2 Y-2 E-3 F300 + # Raise nozzle by 10mm + G1 Z10 F3000 + G90 + # Disable steppers + M84 + + + +###################################################################### +# Override M117 command with rawparams +###################################################################### + +# The macro below will override the default M117 command to echo the message. +# +# It uses the rawparams pseudo-variable that contains the full unparsed +# parameters that was passed to the M117 command. +# +# As this can include comments, we are trimming the text when a `;` or `#` is +# found, and escaping any existing `"` + +[gcode_macro M117] +rename_existing: M117.1 +gcode: + {% if rawparams %} + {% set escaped_msg = rawparams.split(';', 1)[0].split('\x23', 1)[0]|replace('"', '\\"') %} + SET_DISPLAY_TEXT MSG="{escaped_msg}" + RESPOND TYPE=command MSG="{escaped_msg}" + {% else %} + SET_DISPLAY_TEXT + {% endif %} + +# SDCard 'looping' (aka Marlin M808 commands) support +# +# Support SDCard looping +[sdcard_loop] + +# 'Marlin' style M808 compatibility macro for SDCard looping +[gcode_macro M808] +gcode: + {% if params.K is not defined and params.L is defined %}SDCARD_LOOP_BEGIN COUNT={params.L|int}{% endif %} + {% if params.K is not defined and params.L is not defined %}SDCARD_LOOP_END{% endif %} + {% if params.K is defined and params.L is not defined %}SDCARD_LOOP_DESIST{% endif %} + +# Cancel object (aka Marlin/RRF M486 commands) support +# +# Enable object exclusion +[exclude_object] + +[gcode_macro M486] +gcode: + # Parameters known to M486 are as follows: + # [C] Cancel the current object + # [P] Cancel the object with the given index + # [S] Set the index of the current object. + # If the object with the given index has been canceled, this will cause + # the firmware to skip to the next object. The value -1 is used to + # indicate something that isn’t an object and shouldn’t be skipped. + # [T] Reset the state and set the number of objects + # [U] Un-cancel the object with the given index. This command will be + # ignored if the object has already been skipped + + {% if 'exclude_object' not in printer %} + {action_raise_error("[exclude_object] is not enabled")} + {% endif %} + + {% if 'T' in params %} + EXCLUDE_OBJECT RESET=1 + + {% for i in range(params.T | int) %} + EXCLUDE_OBJECT_DEFINE NAME={i} + {% endfor %} + {% endif %} + + {% if 'C' in params %} + EXCLUDE_OBJECT CURRENT=1 + {% endif %} + + {% if 'P' in params %} + EXCLUDE_OBJECT NAME={params.P} + {% endif %} + + {% if 'S' in params %} + {% if params.S == '-1' %} + {% if printer.exclude_object.current_object %} + EXCLUDE_OBJECT_END NAME={printer.exclude_object.current_object} + {% endif %} + {% else %} + EXCLUDE_OBJECT_START NAME={params.S} + {% endif %} + {% endif %} + + {% if 'U' in params %} + EXCLUDE_OBJECT RESET=1 NAME={params.U} + {% endif %} + +###################################################################### +# G130: Set digital potentiometer value +###################################################################### + +# The macro below uses the MCP4018 SET_DIGIPOT command to implement +# a `G130` as used on classic Mightyboard-based printers such as +# The Makerbot Replicator 2/2X. +# +# The `G130` command can be used to lower the stepper current +# during preheating and raise the current again prior to starting +# the print. This is necessary for printers with smaller power +# supplies that needed all the power to heat the bed. +# +# This macro requires one or more [mcp4018] configuration sections: +# (x_axis_pot, y_axis_pot, z_axis_pot, a_axis_pot, b_axis_pot) +# +# Example: G130 X20 Y20 Z20 A20 B20 ; Lower stepper Vrefs while heating + +[gcode_macro G130] +gcode: + M400 + {% if ('X' in params) and ('mcp4018 x_axis_pot' in printer.configfile.config) %} + {% set x_value = params['X']|float %} + {% set x_axis_pot_scale = printer.configfile.config["mcp4018 x_axis_pot"].scale|float %} + SET_DIGIPOT DIGIPOT=x_axis_pot WIPER={ x_axis_pot_scale * (x_value / 127.0)} + {% endif %} + {% if ('Y' in params) and ('mcp4018 y_axis_pot' in printer.configfile.config) %} + {% set y_value = params['Y']|float %} + {% set y_axis_pot_scale = printer.configfile.config["mcp4018 y_axis_pot"].scale|float %} + SET_DIGIPOT DIGIPOT=y_axis_pot WIPER={ y_axis_pot_scale * (y_value / 127.0)} + {% endif %} + {% if ('Z' in params) and ('mcp4018 z_axis_pot' in printer.configfile.config) %} + {% set z_value = params['Z']|float %} + {% set z_axis_pot_scale = printer.configfile.config["mcp4018 z_axis_pot"].scale|float %} + SET_DIGIPOT DIGIPOT=z_axis_pot WIPER={ z_axis_pot_scale * (z_value / 127.0)} + {% endif %} + {% if ('A' in params) and ('mcp4018 a_axis_pot' in printer.configfile.config) %} + {% set a_value = params['A']|float %} + {% set a_axis_pot_scale = printer.configfile.config["mcp4018 a_axis_pot"].scale|float %} + SET_DIGIPOT DIGIPOT=a_axis_pot WIPER={ a_axis_pot_scale * (a_value / 127.0)} + {% endif %} + {% if ('B' in params) and ('mcp4018 b_axis_pot' in printer.configfile.config) %} + {% set b_value = params['B']|float %} + {% set b_axis_pot_scale = printer.configfile.config["mcp4018 b_axis_pot"].scale|float %} + SET_DIGIPOT DIGIPOT=b_axis_pot WIPER={ b_axis_pot_scale * (b_value / 127.0)} + {% endif %} \ No newline at end of file diff --git a/moonraker-sql.db b/moonraker-sql.db index 56f3a17d01540e9d4e41ab861567b441947436dc..54fe20f29f376740622e80ea3b7891bf9356c078 100644 GIT binary patch delta 3785 zcmd5)-YMnbH8T*n%GA+T_mt{F~A|`@RQ#(^C7|6q&d1Rw3F0Rd4 zg#s?JZ3ZfM*3+16$8NV}XW8|oVwT?P%iOv@FOANKU-HAuEmw1&#Dlf9+ z9IIl}d8cHPuMRadbTlVZZKj8dsg=nMDYwVSFTgp+udATuV=T zsF=l`Z>Dg|w!HG=uf7nfRurJ7A&@0rfaH@Q)Bp@w;GiP1CK7a36nT@?I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b)J7MeMq?(H}hV%GOxxiQ^wxOWzMnY3y%e z|E_2Zxjee&T5-ASH}S4Jw24m<{bh4}URolNuX)+%|HbL)H0Zg^v2Cn-K093pRzK|NTOI8(*p2DZdj{psgDvv=$N8wo!%k)W-Fsll}On@|~Q8|M* OZoqdvLr>gshW-N=v&EJG delta 703 zcmZp8z|ydQWr8%THvRYOY}LI`9A^$82C2x6ujV{{KZ~?S)RvWGP{HR zW($WS+!H65Z8q?^qRhj@{|%%}kpDOTx6OhHcljp<@NE8B&%^H($|kMIz$l%OSzMA| zR9TW=l9&^pm7i41my(*6SejF!76wwlj;f#}GdI=Y?UXz39Or(9s?&^`?BB1&7&*DB zUxPh@P1+c!XY#E1Qf7`!7t8E>R4dXM>!O=iP?VWh5)U@@b^q#?CmToMmf4K*%Go>f{ILj}+SQ2EHoQ|7BPMoiu_UxhJz^27OZ zjA5G=Y~&U!t}M>X%Pi3=Ni0fFEm6`@n7m=NByX&af|6reNotXjl|uAnnKd$#_pFwm z%(zBIKvyp}zcde|P$?;~I5T;(|C(MF9#caLBRwM%b0b4DqscEeB&sAQ8KoMUCa36H znxT^pn{OXfVP&(CV38F~nOt|!oUwMZ?eTR?EXIcBCX?Tve8XaFYHqUm{wXC^ zQ8p_EcE&QQ%;!0p*yr(aF&1uYjArC$iB@3M)a+!Kyz7$sb{0OyPmGga-I7u? zGqyA_w$QUQH8U_aF$ekv7*z3@DM0@!8GwN6X4TudOf0+$7*jSjCNOTkcs-1n%|@C< zRz7O7%SH3e6Yu6Tu>jqkHL)>m^PQ_-85tQiJz!DbVB$7o;GNBFwpma>i<`M6iEr|Q RkJ^(HUUO~F<7S-10sz-p>s$Z; diff --git a/moonraker.conf b/moonraker.conf index f62fc4a..aafab8b 100644 --- a/moonraker.conf +++ b/moonraker.conf @@ -53,3 +53,11 @@ managed_services: crowsnest install_script: tools/pkglist.sh [include octoapp-system.cfg] + +[update_manager Klipper-Adaptive-Meshing-Purging] +type: git_repo +channel: dev +path: ~/Klipper-Adaptive-Meshing-Purging +origin: https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git +managed_services: klipper +primary_branch: main diff --git a/printer.cfg b/printer.cfg index d7d28db..54779b5 100644 --- a/printer.cfg +++ b/printer.cfg @@ -11,6 +11,11 @@ on_error_gcode: CANCEL_PRINT # [include adxlmcu.cfg] [include config_backup.cfg] +[include KAMP_Settings.cfg] + +[include macros.cfg] + + # This file contains common pin mappings for MKS Robin Nano V2 # boards. To use this config, the firmware should be compiled for the # STM32F103. When running "make menuconfig", enable "extra low-level @@ -28,9 +33,6 @@ on_error_gcode: CANCEL_PRINT # See docs/Config_Reference.md for a description of parameters. -[pause_resume] - -[display_status] [printer] @@ -246,6 +248,12 @@ retries: 10 retry_tolerance: 0.02 +[exclude_object] + +[pause_resume] + +[display_status] + [respond] #*# <---------------------- SAVE_CONFIG ---------------------->