New backup from 23/08/24 - 22:29:56

This commit is contained in:
2024-08-23 22:29:56 +05:00
parent e292b40c69
commit 0653d47cf4
6 changed files with 150 additions and 303 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.env
secrets.conf
klipper-macros/
*.swp
*.tmp
*.DEF

View File

@@ -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. ")}

View File

@@ -0,0 +1,73 @@
# All customizations are documented in globals.cfg. Just copy a variable from
# there into the section below, and change the value to meet your needs.
[gcode_macro _km_options]
# These are examples of some likely customizations:
# Any sheets in the below list will be available with a configurable offset.
#variable_bed_surfaces: ['smooth_1','texture_1']
# Length (in mm) of filament to load (bowden tubes will be longer).
#variable_load_length: 90.0
# Hide the Octoprint LCD menu since I don't use it.
variable_menu_show_octoprint: False
# Customize the filament menus (up to 10 entries).
variable_menu_temperature: [
{'name' : 'PLA', 'extruder' : 225.0, 'bed' : 60.0},
{'name' : 'PETG', 'extruder' : 230.0, 'bed' : 85.0},
{'name' : 'ABS', 'extruder' : 245.0, 'bed' : 90.0, 'chamber' : 60}]
# Length of filament (in millimeters) to purge at print start.
#variable_start_purge_length: 30 # This value works for most setups.
gcode: # This line is required by Klipper.
# Any code you put here will run at klipper startup, after the initialization
# for these macros. For example, you could uncomment the following line to
# automatically adjust your bed surface offsets to account for any changes made
# to your Z endstop or probe offset.
ADJUST_SURFACE_OFFSETS
[gcode_macro update_git]
gcode:
{% set message = params.MESSAGE|default() %}
{% if message %}
RUN_SHELL_COMMAND CMD=update_git_script_message PARAMS="'{params.MESSAGE}'"
{% else %}
RUN_SHELL_COMMAND CMD=update_git_script
{% endif %}
[gcode_shell_command update_git_script]
command: bash -c "bash $HOME/klipper-backup-steel/script.sh"
timeout: 90.0
verbose: True
[gcode_shell_command update_git_script_message]
command: bash -c "bash $HOME/klipper-backup-steel/script.sh $0"
timeout: 90.0
verbose: True
# This line includes all the standard macros.
[include klipper-macros/*.cfg]
# Uncomment to include features that require specific hardware support.
# LCD menu support for features like bed surface selection and pause next layer.
#[include klipper-macros/optional/lcd_menus.cfg]
# Optimized bed leveling
#[include klipper-macros/optional/bed_mesh.cfg]
# The sections below here are required for the macros to work. If your config
# already has some of these sections you should merge the duplicates into one
# (or if they are identical just remove one of them).
[idle_timeout]
gcode:
_KM_IDLE_TIMEOUT # This line must be in your idle_timeout section.
[pause_resume]
[respond]
[save_variables]
filename: ~/steel_data/variables.cfg
[virtual_sdcard]
path: ~/steel_data/gcodes
on_error_gcode: CANCEL_PRINT
[display_status]
[exclude_object]

View File

@@ -1,267 +0,0 @@
# 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.
#
# BACKUP config to git.npau.ru
[gcode_macro update_git]
gcode:
{% set message = params.MESSAGE|default() %}
{% if message %}
RUN_SHELL_COMMAND CMD=update_git_script_message PARAMS="'{params.MESSAGE}'"
{% else %}
RUN_SHELL_COMMAND CMD=update_git_script
{% endif %}
[gcode_shell_command update_git_script]
command: bash -c "bash $HOME/klipper-backup-steel/script.sh"
timeout: 90.0
verbose: True
[gcode_shell_command update_git_script_message]
command: bash -c "bash $HOME/klipper-backup-steel/script.sh $0"
timeout: 90.0
verbose: True
######################################################################
# 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 _POWER_OFF_PRINTER]
gcode:
{action_call_remote_method("set_device_power",
device="printer",
state="off")}
[delayed_gcode POWER_OFF_PRINTER_CHECK]
gcode:
{% if printer.idle_timeout.state == "Idle" or printer.idle_timeout.state == "Ready" %}
{% if printer.extruder.temperature < 50.0 and printer.heater_bed.temperature < 50.0 %}
{% if printer.extruder.target == 0.0 and printer.heater_bed.target == 0.0 %}
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=0
_POWER_OFF_PRINTER
{% else %}
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=2
{% endif %}
{% else %}
{% if printer.idle_timeout.state == "Printing" %}
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=0
{% else %}
{% if printer.extruder.target == 0.0 and printer.heater_bed.target == 0.0 %}
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=2
{% else %}
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=0
{% endif %}
{% endif %}
{% endif %}
{% endif %}
[gcode_macro ACTIVATE_POWER_OFF]
gcode:
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK_ACT DURATION=60
[gcode_macro DEACTIVATE_POWER_OFF]
gcode:
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK_ACT DURATION=0
[delayed_gcode POWER_OFF_PRINTER_CHECK_ACT]
gcode:
{% if printer.idle_timeout.state == "Idle" or printer.idle_timeout.state == "Ready" %}
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=30
{% else %}
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK_ACT DURATION=60
{% endif %}
[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
BED_MESH_PROFILE LOAD=default
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
######################################################################
# Beeper
######################################################################
# M300 : Play tone. Beeper support, as commonly found on usual LCD
# displays (i.e. RepRapDiscount 2004 Smart Controller, RepRapDiscount
# 12864 Full Graphic). This defines a custom I/O pin and a custom
# GCODE macro. Usage:
# M300 [P<ms>] [S<Hz>]
# P is the tone duration, S the tone frequency.
# The frequency won't be pitch perfect.
[pwm_cycle_time BEEPER_pin]
pin: EXP1_1
# Beeper pin. This parameter must be provided.
# ar37 is the default RAMPS/MKS pin.
value: 0
# Silent at power on, set to 1 if active low.
shutdown_value: 0
# Disable at emergency shutdown (no PWM would be available anyway).
cycle_time: 0.001
# Default PWM frequency : 0.001 = 1ms will give a tone of 1kHz
# Although not pitch perfect.
[gcode_macro M300]
gcode:
# Use a default 1kHz tone if S is omitted.
{% set S = params.S|default(1000)|int %}
# Use a 10ms duration is P is omitted.
{% set P = params.P|default(100)|int %}
SET_PIN PIN=BEEPER_pin VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 }
G4 P{P}
SET_PIN PIN=BEEPER_pin VALUE=0
######################################################################
# Filament Change
######################################################################
# M600: Filament Change. This macro will pause the printer, move the
# tool to the change position, and retract the filament 50mm. Adjust
# the retraction settings for your own extruder. After filament has
# been changed, the print can be resumed from its previous position
# with the "RESUME" gcode.
[pause_resume]
[gcode_macro M600]
gcode:
{% set X = params.X|default(50)|float %}
{% set Y = params.Y|default(0)|float %}
{% set Z = params.Z|default(10)|float %}
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
G1 E-.8 F2700
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
G91
G1 E-50 F1000
RESTORE_GCODE_STATE NAME=M600_state
######################################################################
# 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<flag>] Cancel the current object
# [P<index>] Cancel the object with the given index
# [S<index>] 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 isnt an object and shouldnt be skipped.
# [T<count>] Reset the state and set the number of objects
# [U<index>] 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 %}

View File

@@ -72,6 +72,14 @@ origin: https://github.com/Staubgeborener/klipper-backup.git
managed_services: moonraker
primary_branch: main
[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
[power printer]
type: gpio
pin: gpiochip0/gpio2

View File

@@ -1,15 +1,6 @@
[include shell_command.cfg]
[include fluidd.cfg]
[include jschuh_klipper_macros.cfg]
[virtual_sdcard]
path: /home/jeka/steel_data/gcodes
on_error_gcode: CANCEL_PRINT
[include macros.cfg]
[virtual_sdcard]
path: /home/jeka/steel_data/gcodes
on_error_gcode: CANCEL_PRINT
#[include KAMP_Settings.cfg]
[temperature_sensor raspberypi]
sensor_type: temperature_host
@@ -22,8 +13,8 @@ serial: /dev/ttySteel
[bed_mesh]
speed: 60
horizontal_move_z: 5
mesh_min: 15,15
mesh_max: 180,180
mesh_min: 6,12
mesh_max: 176,162
probe_count: 3, 3
mesh_pps: 2, 2
fade_start: 1
@@ -31,42 +22,43 @@ fade_end: 10
fade_target: 0
[bed_screws]
screw1: 15,10
screw1: 20,0
screw1_name: Front left screw
screw2: 15,185
screw2: 20,150
screw2_name: Rear left screw
screw3: 185,10
screw3: 190,0
screw3_name: Front right screw
screw4: 185,185
screw4: 190,150
screw4_name: Rear right screw
[screws_tilt_adjust]
horizontal_move_z: 5
screw1: 15,185
horizontal_move_z: 3
speed: 60
screw1: 20,150
screw1_name: back left
screw2: 185,185
screw2: 190,150
screw2_name: back right
screw3: 15,10
screw3: 20,0
screw3_name: front left
screw4: 185,10
screw4: 190,0
screw4_name: front right
screw_thread: CW-M3
[bltouch]
sensor_pin: PD2 #^PD3
control_pin: PB5
x_offset: 36
y_offset: 1
x_offset: -4
y_offset: 12
speed: 10.0
samples: 2
speed: 2
z_offset: 0.0
#z_offset: 0.0
probe_with_touch_mode: False
pin_up_reports_not_triggered: True
pin_up_touch_mode_reports_triggered: True
[safe_z_home]
home_xy_position: 92, 92# Change coordinates to the center of your print bed
home_xy_position: 105, 105# Change coordinates to the center of your print bed
speed: 50
z_hop: 10 # Move up 10mm
z_hop_speed: 5
@@ -103,6 +95,7 @@ microsteps: 16
rotation_distance: 0.8
endstop_pin: ^!PD3
#position_endstop: 0.0
endstop_pin: probe:z_virtual_endstop
position_max: 270
position_min: -5
homing_speed: 20
@@ -190,26 +183,29 @@ aliases:
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 30.847
#*# pid_ki = 2.571
#*# pid_kd = 92.540
#*# pid_kp = 28.573
#*# pid_ki = 2.352
#*# pid_kd = 86.791
#*#
#*# [stepper_z]
#*# position_endstop = 4.180
#*#
#*# [bltouch]
#*# z_offset = 1.330
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.410000, 0.500000, 0.390000
#*# 0.380000, 0.360000, 0.190000
#*# 0.330000, 0.410000, 0.320000
#*# -0.161375, -0.108500, -0.073500
#*# -0.004250, 0.004625, -0.081375
#*# -0.114250, -0.068625, -0.141250
#*# x_count = 3
#*# y_count = 3
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 15.0
#*# max_x = 180.0
#*# min_y = 15.0
#*# max_y = 180.0
#*# min_x = 6.0
#*# max_x = 176.0
#*# min_y = 12.0
#*# max_y = 162.0