added klipper configuration
This commit is contained in:
parent
f83bf713fe
commit
fecc94e35d
170
02-klipper/01-configuration/KlipperScreen.conf
Normal file
170
02-klipper/01-configuration/KlipperScreen.conf
Normal file
@ -0,0 +1,170 @@
|
||||
# _____ __ _ _ _
|
||||
# / ____| / _(_) | | (_)
|
||||
# | | ___ _ __ | |_ _ __ _ _ _ _ __ __ _| |_ _ ___ _ __ ___
|
||||
# | | / _ \| '_ \| _| |/ _` | | | | '__/ _` | __| |/ _ \| '_ \/ __|
|
||||
# | |___| (_) | | | | | | | (_| | |_| | | | (_| | |_| | (_) | | | \__ \
|
||||
# \_____\___/|_| |_|_| |_|\__, |\__,_|_| \__,_|\__|_|\___/|_| |_|___/
|
||||
# __/ |
|
||||
# |___/
|
||||
#
|
||||
# KlipperScreen Configurations
|
||||
#
|
||||
# Guislain Cyril
|
||||
|
||||
|
||||
########################################
|
||||
# Preheat Settings
|
||||
########################################
|
||||
|
||||
[preheat PLA]
|
||||
extruder = 210
|
||||
heater_bed = 65
|
||||
|
||||
[preheat PETG]
|
||||
extruder = 240
|
||||
heater_bed = 80
|
||||
|
||||
[preheat FLEX]
|
||||
extruder = 210
|
||||
heater_bed = 0
|
||||
|
||||
[preheat ABS]
|
||||
extruder = 245
|
||||
heater_bed = 90
|
||||
|
||||
[preheat cooldown]
|
||||
gcode: M107
|
||||
|
||||
|
||||
########################################
|
||||
# Multiple Instances Settings
|
||||
########################################
|
||||
|
||||
# For Multi Instances using, uncomment and edit lines you need by removing the '#' symbol.
|
||||
|
||||
# If multiple printers are defined, this can be set the name of the one to show at startup.
|
||||
[main]
|
||||
#default_printer: FLSUN V400
|
||||
|
||||
|
||||
########################################
|
||||
# Printer 1 Settings
|
||||
########################################
|
||||
|
||||
# Define printer name. Name is anything after the first printer word.
|
||||
[printer FLSUN V400]
|
||||
|
||||
# Define the moonraker host/port if different from 127.0.0.1 and 7125.
|
||||
moonraker_host: 127.0.0.1
|
||||
moonraker_port: 7125
|
||||
|
||||
# Override the movement speed and set a specific for this printer.
|
||||
# These setting overrides the settings configured in the UI. If specified,
|
||||
# the values configured in the UI will not be used.
|
||||
move_speed_xy: 80
|
||||
move_speed_z: 80
|
||||
|
||||
# Define distances and speeds for the extrude panel.
|
||||
extrude_distances: 5, 10, 15, 25
|
||||
extrude_speeds: 1, 2, 5, 10
|
||||
|
||||
|
||||
########################################
|
||||
# Printer 2 Settings
|
||||
########################################
|
||||
|
||||
# For Multi Instances using, uncomment and edit lines you need by removing the '#' symbol.
|
||||
|
||||
# Define printer name. Name is anything after the first printer word.
|
||||
#[printer Printer 2]
|
||||
|
||||
# Define the moonraker host/port if different from 127.0.0.1 and 7125.
|
||||
#moonraker_host: 127.0.0.1
|
||||
#moonraker_port: 7126
|
||||
|
||||
# Override the movement speed and set a specific for this printer.
|
||||
# These setting overrides the settings configured in the UI. If specified,
|
||||
# the values configured in the UI will not be used.
|
||||
#move_speed_xy: 80
|
||||
#move_speed_z: 80
|
||||
|
||||
# Define distances and speeds for the extrude panel.
|
||||
#extrude_distances: 5, 10, 15, 25
|
||||
#extrude_speeds: 1, 2, 5, 10
|
||||
|
||||
|
||||
########################################
|
||||
# Printer 3 Settings
|
||||
########################################
|
||||
|
||||
# For Multi Instances using, uncomment and edit lines you need by removing the '#' symbol.
|
||||
|
||||
# Define printer name. Name is anything after the first printer word.
|
||||
#[printer Printer 3]
|
||||
|
||||
# Define the moonraker host/port if different from 127.0.0.1 and 7125.
|
||||
#moonraker_host: 127.0.0.1
|
||||
#moonraker_port: 7127
|
||||
|
||||
# Override the movement speed and set a specific for this printer.
|
||||
# These setting overrides the settings configured in the UI. If specified,
|
||||
# the values configured in the UI will not be used.
|
||||
#move_speed_xy: 80
|
||||
#move_speed_z: 80
|
||||
|
||||
# Define distances and speeds for the extrude panel.
|
||||
#extrude_distances: 5, 10, 15, 25
|
||||
#extrude_speeds: 1, 2, 5, 10
|
||||
|
||||
#~# --- Do not edit below this line. This section is auto generated --- #~#
|
||||
#~#
|
||||
#~# [main]
|
||||
#~# screen_blanking_printing = 1800
|
||||
#~# show_heater_power = True
|
||||
#~# move_speed_xy = 80
|
||||
#~# move_speed_z = 80
|
||||
#~# print_sort_dir = date_desc
|
||||
#~#
|
||||
#~# [displayed_macros FLSUN V400]
|
||||
#~# bed_glow = False
|
||||
#~# cancel_print = False
|
||||
#~# bed_progress = False
|
||||
#~# end_print = False
|
||||
#~# m205 = False
|
||||
#~# m204 = False
|
||||
#~# hotend_glow = False
|
||||
#~# load_filament = False
|
||||
#~# led_logo_on = False
|
||||
#~# hotend_progress = False
|
||||
#~# neopixel_orange = False
|
||||
#~# neopixel_violet = False
|
||||
#~# pause = False
|
||||
#~# percent_glow = False
|
||||
#~# neopixel_green = False
|
||||
#~# m600 = False
|
||||
#~# move_to_z0 = False
|
||||
#~# neopixel_off = False
|
||||
#~# percent_progress = False
|
||||
#~# neopixel_display = False
|
||||
#~# neopixel_blue = False
|
||||
#~# resume = False
|
||||
#~# z-down = False
|
||||
#~# speed_glow = False
|
||||
#~# pressure_advance = False
|
||||
#~# z-up = False
|
||||
#~# set_gcode_offset = False
|
||||
#~# neopixel_on = False
|
||||
#~# unload_filament = False
|
||||
#~# speed_progress = False
|
||||
#~# neopixel_yellow = False
|
||||
#~# start_print = False
|
||||
#~# adxl_axe_x = False
|
||||
#~# adxl_axe_y = False
|
||||
#~# adxl_noise = False
|
||||
#~# adxl_test = False
|
||||
#~# neopixel_red = False
|
||||
#~# get_timelapse_setup = False
|
||||
#~# hyperlapse = False
|
||||
#~# test_stream_delay = False
|
||||
#~# timelapse_take_frame = False
|
||||
#~#
|
31
02-klipper/01-configuration/adxl345_fysetc.cfg
Normal file
31
02-klipper/01-configuration/adxl345_fysetc.cfg
Normal file
@ -0,0 +1,31 @@
|
||||
# _ _ ____ _ _ _____
|
||||
# /\ | | | |___ \| || | | ____|
|
||||
# / \ __| |_ _| | __) | || |_| |__
|
||||
# / /\ \ / _` \ \/ / ||__ <|__ _|___ \
|
||||
# / ____ \ (_| |> <| |___) | | | ___) |
|
||||
# /_/ \_\__,_/_/\_\_|____/ |_| |____/
|
||||
#
|
||||
# ADXL345 Configurations - Flsun Speeder Pad
|
||||
#
|
||||
# Guislain Cyril
|
||||
|
||||
|
||||
[mcu PIS]
|
||||
serial: XXXXX
|
||||
restart_method: command
|
||||
|
||||
[adxl345]
|
||||
cs_pin: PIS:gpio13
|
||||
spi_software_sclk_pin: PIS:gpio10
|
||||
spi_software_mosi_pin: PIS:gpio11
|
||||
spi_software_miso_pin: PIS:gpio12
|
||||
axes_map: x,-z,y
|
||||
|
||||
[resonance_tester]
|
||||
accel_chip: adxl345
|
||||
min_freq: 1
|
||||
max_freq: 133
|
||||
accel_per_hz: 100
|
||||
max_smoothing: 0.5
|
||||
probe_points:
|
||||
0, 0, 25
|
29
02-klipper/01-configuration/adxl345_pico.cfg
Normal file
29
02-klipper/01-configuration/adxl345_pico.cfg
Normal file
@ -0,0 +1,29 @@
|
||||
# _ _ ____ _ _ _____
|
||||
# /\ | | | |___ \| || | | ____|
|
||||
# / \ __| |_ _| | __) | || |_| |__
|
||||
# / /\ \ / _` \ \/ / ||__ <|__ _|___ \
|
||||
# / ____ \ (_| |> <| |___) | | | ___) |
|
||||
# /_/ \_\__,_/_/\_\_|____/ |_| |____/
|
||||
#
|
||||
# ADXL345 Configurations - Flsun Speeder Pad
|
||||
#
|
||||
# Guislain Cyril
|
||||
|
||||
|
||||
[mcu adxl]
|
||||
serial: XXXXX
|
||||
restart_method: command
|
||||
|
||||
[adxl345]
|
||||
cs_pin: adxl:gpio1
|
||||
spi_bus: spi0a
|
||||
axes_map: x,-z,y
|
||||
|
||||
[resonance_tester]
|
||||
accel_chip: adxl345
|
||||
min_freq: 1
|
||||
max_freq: 133
|
||||
accel_per_hz: 100
|
||||
max_smoothing: 0.5
|
||||
probe_points:
|
||||
0, 0, 25
|
47
02-klipper/01-configuration/crowsnest.conf
Normal file
47
02-klipper/01-configuration/crowsnest.conf
Normal file
@ -0,0 +1,47 @@
|
||||
#### crowsnest.conf
|
||||
#### This is a typical default config.
|
||||
#### Also used as default in mainsail / MainsailOS
|
||||
#### See:
|
||||
#### https://github.com/mainsail-crew/crowsnest/blob/master/README.md
|
||||
#### for details to configure to your needs.
|
||||
|
||||
|
||||
#####################################################################
|
||||
#### #####
|
||||
#### Information about ports and according URL's #####
|
||||
#### #####
|
||||
#####################################################################
|
||||
#### #####
|
||||
#### Port 8080 equals /webcam/?action=[stream/snapshot] #####
|
||||
#### Port 8081 equals /webcam2/?action=[stream/snapshot] #####
|
||||
#### Port 8082 equals /webcam3/?action=[stream/snapshot] #####
|
||||
#### Port 8083 equals /webcam4/?action=[stream/snapshot] #####
|
||||
#### #####
|
||||
#### Note: These ports are default for most Mainsail #####
|
||||
#### installations. To use any other port would involve #####
|
||||
#### changing the proxy configuration or using directly #####
|
||||
#### http://<ip>:<port>/?action=[stream/snapshot] #####
|
||||
#### #####
|
||||
#####################################################################
|
||||
#### RTSP Stream URL: ( if enabled and supported ) #####
|
||||
#### rtsp://<ip>:<rtsp_port>/stream.h264 #####
|
||||
#####################################################################
|
||||
|
||||
|
||||
[crowsnest]
|
||||
log_path: /home/pi/printer_data/logs/crowsnest.log
|
||||
log_level: quiet # Valid Options are quiet/verbose/debug
|
||||
delete_log: true # Deletes log on every restart, if set to true
|
||||
no_proxy: false
|
||||
|
||||
[cam logiC270]
|
||||
mode: ustreamer # ustreamer - Provides mjpg and snapshots. (All devices)
|
||||
# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
|
||||
enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server
|
||||
#rtsp_port: 8554 # Set different ports for each device!
|
||||
port: 8080 # HTTP/MJPG Stream/Snapshot Port
|
||||
device: /dev/video0 # See Log for available ...
|
||||
resolution: 1280x720 # widthxheight format
|
||||
max_fps: 15 # If Hardware Supports this it will be forced, otherwise ignored/coerced.
|
||||
#custom_flags: # You can run the Stream Services with custom flags.
|
||||
#v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of.
|
589
02-klipper/01-configuration/macros.cfg
Normal file
589
02-klipper/01-configuration/macros.cfg
Normal file
@ -0,0 +1,589 @@
|
||||
# __ __
|
||||
# | \/ |
|
||||
# | \ / | __ _ ___ _ __ ___ ___
|
||||
# | |\/| |/ _` |/ __| '__/ _ \/ __|
|
||||
# | | | | (_| | (__| | | (_) \__ \
|
||||
# |_| |_|\__,_|\___|_| \___/|___/
|
||||
#
|
||||
# Macros Configurations - Flsun V400
|
||||
# Version 3.0
|
||||
#
|
||||
# Guislain Cyril
|
||||
|
||||
|
||||
##################################################
|
||||
# Start and End G-Codes
|
||||
##################################################
|
||||
|
||||
[gcode_macro START_PRINT]
|
||||
description: Start G-Code
|
||||
gcode:
|
||||
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
|
||||
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(210)|float %}
|
||||
LED_HOTEND_ON
|
||||
G21
|
||||
G90
|
||||
M82
|
||||
{% if printer.extruder.target != 0 %}
|
||||
M104 S{EXTRUDER_TEMP}
|
||||
{% else %}
|
||||
M104 S150
|
||||
{% endif %}
|
||||
M140 S{BED_TEMP}
|
||||
{% if printer.toolhead.homed_axes != "xyz" %}
|
||||
G28
|
||||
{% endif %}
|
||||
G1 Z370 F3000
|
||||
G1 X-150 F3000
|
||||
M190 S{BED_TEMP}
|
||||
M109 S{EXTRUDER_TEMP}
|
||||
G1 Z1 F3000
|
||||
G1 X-150 Y0 Z0.4
|
||||
G92 E0
|
||||
G3 X0 Y-130 I150 J1 Z0.3 E30 F2000
|
||||
G92 E0
|
||||
G1 E-1 F2100
|
||||
|
||||
|
||||
[gcode_macro END_PRINT]
|
||||
description: End G-Code
|
||||
gcode:
|
||||
M106 S0
|
||||
M104 S0
|
||||
M140 S0
|
||||
G92 E0
|
||||
G91
|
||||
G1 E-1 F2100
|
||||
G1 Z+5 F6000
|
||||
G28
|
||||
G90
|
||||
LED_HOTEND_OFF
|
||||
M84
|
||||
|
||||
|
||||
##################################################
|
||||
# Pause / Resume / Cancel Print
|
||||
##################################################
|
||||
|
||||
[gcode_macro PAUSE]
|
||||
description: Pause the current print
|
||||
rename_existing: PAUSE_BASE
|
||||
gcode:
|
||||
##### set defaults #####
|
||||
{% set x = params.X|default(0) %}
|
||||
{% set y = params.Y|default(-90) %}
|
||||
{% set z = params.Z|default(10)|float %}
|
||||
{% set e = params.E|default(1) %}
|
||||
##### calculate save lift position #####
|
||||
{% set max_z = printer.toolhead.axis_maximum.z|float %}
|
||||
{% set act_z = printer.toolhead.position.z|float %}
|
||||
{% set lift_z = z|abs %}
|
||||
{% if act_z < (max_z - lift_z) %}
|
||||
{% set z_safe = lift_z %}
|
||||
{% else %}
|
||||
{% set z_safe = max_z - act_z %}
|
||||
{% endif %}
|
||||
##### end of definitions #####
|
||||
RESPOND MSG="Pausing printing..."
|
||||
PAUSE_BASE
|
||||
G91
|
||||
G1 E-{e} F2100
|
||||
G1 Z{z_safe}
|
||||
G90
|
||||
G1 X{x} Y{y} F2500
|
||||
|
||||
|
||||
[gcode_macro RESUME]
|
||||
description: Resume the current print
|
||||
rename_existing: RESUME_BASE
|
||||
gcode:
|
||||
##### set defaults #####
|
||||
{% set e = params.E|default(1) %}
|
||||
#### get VELOCITY parameter if specified ####
|
||||
{% if 'VELOCITY' in params|upper %}
|
||||
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
|
||||
{% else %}
|
||||
{% set get_params = "" %}
|
||||
{% endif %}
|
||||
##### end of definitions #####
|
||||
G91
|
||||
{% if printer["gcode_macro M600"].m600_enabled == 1 %}
|
||||
RESPOND MSG="Nozzle heating..."
|
||||
M109 S{printer["gcode_macro M600"].hotend_temp}
|
||||
M106 S{printer["gcode_macro M600"].fan_speed}
|
||||
RESPOND MSG="Loading filament..."
|
||||
G0 E50 F800
|
||||
G0 E30 F300
|
||||
M400
|
||||
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=m600_enabled VALUE=0
|
||||
{% else %}
|
||||
G1 E{e} F2100
|
||||
{% endif %}
|
||||
RESPOND MSG="Resuming printing..."
|
||||
SET_IDLE_TIMEOUT TIMEOUT=1800
|
||||
RESUME_BASE {get_params}
|
||||
|
||||
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
description: Cancel the current print
|
||||
rename_existing: CANCEL_PRINT_BASE
|
||||
gcode:
|
||||
RESPOND MSG="Printing canceled!"
|
||||
G28
|
||||
M106 S0
|
||||
M104 S0
|
||||
M140 S0
|
||||
CANCEL_PRINT_BASE
|
||||
|
||||
|
||||
##################################################
|
||||
# Filament / Color Change
|
||||
##################################################
|
||||
|
||||
[gcode_macro M600]
|
||||
description: Filament change
|
||||
variable_hotend_temp: 0
|
||||
variable_m600_enabled: 0
|
||||
variable_fan_speed: 0
|
||||
gcode:
|
||||
##### set defaults #####
|
||||
{% set x = params.X|default(0) %}
|
||||
{% set y = params.Y|default(-140) %}
|
||||
{% set z = params.Z|default(10)|float %}
|
||||
{% set e = params.E|default(1) %}
|
||||
##### calculate save lift position #####
|
||||
{% set max_z = printer.toolhead.axis_maximum.z|float %}
|
||||
{% set act_z = printer.toolhead.position.z|float %}
|
||||
{% set lift_z = z|abs %}
|
||||
{% if act_z < (max_z - lift_z) %}
|
||||
{% set z_safe = lift_z %}
|
||||
{% else %}
|
||||
{% set z_safe = max_z - act_z %}
|
||||
{% endif %}
|
||||
##### end of definitions #####
|
||||
SAVE_GCODE_STATE NAME=M600_state
|
||||
SET_IDLE_TIMEOUT TIMEOUT=86400
|
||||
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=m600_enabled VALUE=1
|
||||
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=hotend_temp VALUE={printer.extruder.target}
|
||||
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=fan_speed VALUE={printer.fan.speed}
|
||||
RESPOND MSG="Pausing printing..."
|
||||
PAUSE
|
||||
G91
|
||||
G1 E-{e} F2100
|
||||
G1 Z{z_safe}
|
||||
G90
|
||||
G1 X{x} Y{y} F2500
|
||||
RESPOND MSG="Unloading filament..."
|
||||
G91
|
||||
G0 E-10 F300
|
||||
G0 E-30 F800
|
||||
M400
|
||||
RESPOND MSG="Nozzle heating stopped!"
|
||||
M104 S0
|
||||
M106 S0
|
||||
RESTORE_GCODE_STATE NAME=M600_state
|
||||
|
||||
|
||||
##################################################
|
||||
# Load / Unload Filament
|
||||
##################################################
|
||||
|
||||
[gcode_macro UNLOAD_FILAMENT]
|
||||
description: Filament unloading
|
||||
gcode:
|
||||
{% if printer.idle_timeout.state == "Printing" and not printer.pause_resume.is_paused %}
|
||||
RESPOND TYPE=error MSG="This macro cannot be used while printing!"
|
||||
{% else %}
|
||||
SAVE_GCODE_STATE NAME=unload_state
|
||||
{% if printer.extruder.temperature < 200 %}
|
||||
RESPOND MSG="Nozzle heating..."
|
||||
M109 S200
|
||||
{% endif %}
|
||||
RESPOND MSG="Unloading filament..."
|
||||
G91
|
||||
G0 E-10 F300
|
||||
G0 E-30 F800
|
||||
RESTORE_GCODE_STATE NAME=unload_state
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro LOAD_FILAMENT]
|
||||
description: Filament loading
|
||||
gcode:
|
||||
{% if printer.idle_timeout.state == "Printing" and not printer.pause_resume.is_paused %}
|
||||
RESPOND TYPE=error MSG="This macro cannot be used while printing!"
|
||||
{% else %}
|
||||
SAVE_GCODE_STATE NAME=load_state
|
||||
{% if printer.extruder.temperature < 200 %}
|
||||
RESPOND MSG="Nozzle heating..."
|
||||
M109 S200
|
||||
{% endif %}
|
||||
RESPOND MSG="Loading filament..."
|
||||
G91
|
||||
G0 E50 F800
|
||||
G0 E30 F300
|
||||
M400
|
||||
RESTORE_GCODE_STATE NAME=load_state
|
||||
{% endif %}
|
||||
|
||||
|
||||
##################################################
|
||||
# Calibrations
|
||||
##################################################
|
||||
|
||||
[gcode_macro Z_OFFSET_CALIBRATION]
|
||||
description: Measure Z-Offset
|
||||
gcode:
|
||||
SET_GCODE_OFFSET Z=0
|
||||
G28
|
||||
G1 X0 Y0 Z50 F2500
|
||||
M400
|
||||
#SET_GCODE_VARIABLE MACRO=_KNOMI_STATUS VARIABLE=probing VALUE=True # Enable if Knomi is used
|
||||
PROBE_CALIBRATE
|
||||
#SET_GCODE_VARIABLE MACRO=_KNOMI_STATUS VARIABLE=probing VALUE=False # Enable if Knomi is used
|
||||
|
||||
|
||||
[gcode_macro ENDSTOPS_CALIBRATION]
|
||||
description: Endstops Phase Calibration
|
||||
gcode:
|
||||
{% if printer.idle_timeout.state == "Printing" %}
|
||||
RESPOND TYPE=error MSG="This macro cannot be used while printing!"
|
||||
{% else %}
|
||||
{% if printer.toolhead.homed_axes != "xyz" %}
|
||||
G28
|
||||
{% endif %}
|
||||
G91
|
||||
G0 Z-80 F1500
|
||||
G28
|
||||
G91
|
||||
G0 Z-80 F1500
|
||||
G28
|
||||
G91
|
||||
G0 Z-80 F1500
|
||||
G28
|
||||
G91
|
||||
G0 Z-80 F1500
|
||||
G28
|
||||
G91
|
||||
G0 Z-80 F1500
|
||||
ENDSTOP_PHASE_CALIBRATE stepper=stepper_a
|
||||
ENDSTOP_PHASE_CALIBRATE stepper=stepper_b
|
||||
ENDSTOP_PHASE_CALIBRATE stepper=stepper_c
|
||||
M400
|
||||
G28
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro DELTA_CALIBRATION]
|
||||
description: Delta Calibration
|
||||
gcode:
|
||||
{% if printer.idle_timeout.state == "Printing" %}
|
||||
RESPOND TYPE=error MSG="This macro cannot be used while printing!"
|
||||
{% else %}
|
||||
SET_GCODE_OFFSET Z=0
|
||||
BED_MESH_CLEAR
|
||||
{% if printer.toolhead.homed_axes != "xyz" %}
|
||||
G28
|
||||
{% endif %}
|
||||
#SET_GCODE_VARIABLE MACRO=_KNOMI_STATUS VARIABLE=probing VALUE=True # Enable if Knomi is used
|
||||
DELTA_CALIBRATE
|
||||
#SET_GCODE_VARIABLE MACRO=_KNOMI_STATUS VARIABLE=probing VALUE=False # Enable if Knomi is used
|
||||
M400
|
||||
G1 X0 Y0 Z50 F2500
|
||||
G28
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro BED_LEVELING]
|
||||
description: Bed Leveling
|
||||
gcode:
|
||||
{% if printer.idle_timeout.state == "Printing" %}
|
||||
RESPOND TYPE=error MSG="This macro cannot be used while printing!"
|
||||
{% else %}
|
||||
SET_GCODE_OFFSET Z=0
|
||||
{% if printer.toolhead.homed_axes != "xyz" %}
|
||||
G28
|
||||
{% endif %}
|
||||
G1 X0 Y0 Z50 F2500
|
||||
#SET_GCODE_VARIABLE MACRO=_KNOMI_STATUS VARIABLE=probing VALUE=True # Enable if Knomi is used
|
||||
BED_MESH_CALIBRATE
|
||||
#SET_GCODE_VARIABLE MACRO=_KNOMI_STATUS VARIABLE=probing VALUE=False # Enable if Knomi is used
|
||||
M400
|
||||
G1 X0 Y0 Z50 F2500
|
||||
G28
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro PRESSURE_ADVANCE]
|
||||
description: Pressure Advance
|
||||
gcode:
|
||||
{% if printer.idle_timeout.state == "Printing" %}
|
||||
RESPOND TYPE=error MSG="This macro cannot be used while printing!"
|
||||
{% else %}
|
||||
SET_PRESSURE_ADVANCE ADVANCE=0
|
||||
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500
|
||||
TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005
|
||||
{% endif %}
|
||||
|
||||
|
||||
##################################################
|
||||
# Nozzle / Bed PID Calibration
|
||||
##################################################
|
||||
|
||||
[gcode_macro PID_BED]
|
||||
description: Bed PID
|
||||
gcode:
|
||||
{% if printer.idle_timeout.state == "Printing" %}
|
||||
RESPOND TYPE=error MSG="This macro cannot be used while printing!"
|
||||
{% else %}
|
||||
RESPOND MSG="Bed PID calibration in progress..."
|
||||
G28
|
||||
G90
|
||||
G1 Z50 F1500
|
||||
M400
|
||||
M106
|
||||
PID_CALIBRATE HEATER=heater_bed TARGET={params.TEMP|default(70)}
|
||||
M107
|
||||
RESPOND MSG="PID calibration complete! Remember to save the configuration!"
|
||||
G28
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro PID_HOTEND]
|
||||
description: Hotend PID
|
||||
gcode:
|
||||
{% if printer.idle_timeout.state == "Printing" %}
|
||||
RESPOND TYPE=error MSG="This macro cannot be used while printing!"
|
||||
{% else %}
|
||||
RESPOND MSG="Hotend PID calibration in progress..."
|
||||
G28
|
||||
G90
|
||||
G1 Z50 F1500
|
||||
M400
|
||||
M106
|
||||
PID_CALIBRATE HEATER=extruder TARGET={params.TEMP|default(250)}
|
||||
M107
|
||||
RESPOND MSG="PID calibration complete! Remember to save the configuration!"
|
||||
G28
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro _PID_KS_START]
|
||||
description: PID for KlipperScreen
|
||||
gcode:
|
||||
RESPOND MSG="PID calibration in progress..."
|
||||
G28
|
||||
G90
|
||||
G1 Z50 F1500
|
||||
M400
|
||||
M106
|
||||
|
||||
|
||||
[gcode_macro _PID_KS_END]
|
||||
description: PID for KlipperScreen
|
||||
gcode:
|
||||
M107
|
||||
RESPOND MSG="PID calibration complete! Remember to save the configuration!"
|
||||
G28
|
||||
|
||||
|
||||
##################################################
|
||||
# Verifications and Measurements with ADXL
|
||||
##################################################
|
||||
|
||||
[gcode_macro ADXL_TEST]
|
||||
description: ADXL Test
|
||||
gcode:
|
||||
ACCELEROMETER_QUERY
|
||||
|
||||
|
||||
[gcode_macro ADXL_NOISE]
|
||||
description: Measure Accelerometer Noise
|
||||
gcode:
|
||||
MEASURE_AXES_NOISE
|
||||
|
||||
|
||||
[gcode_macro ADXL_AXE_X]
|
||||
description: Measure X axis resonances
|
||||
gcode:
|
||||
SHAPER_CALIBRATE AXIS=X
|
||||
|
||||
|
||||
[gcode_macro ADXL_AXE_Y]
|
||||
description: Measure Y axis resonances
|
||||
gcode:
|
||||
SHAPER_CALIBRATE AXIS=Y
|
||||
|
||||
|
||||
##################################################
|
||||
# Save Configuration
|
||||
##################################################
|
||||
|
||||
[gcode_macro SAVE]
|
||||
description: Save Configuration
|
||||
gcode:
|
||||
SAVE_CONFIG
|
||||
|
||||
|
||||
##################################################
|
||||
# Power On/Off LED
|
||||
##################################################
|
||||
|
||||
[gcode_macro LED_HOTEND_ON]
|
||||
description: Turn on Hotend LEDs
|
||||
gcode:
|
||||
SET_PIN PIN=LED_Hotend VALUE=1
|
||||
|
||||
|
||||
[gcode_macro LED_HOTEND_OFF]
|
||||
description: Turn off Hotend LEDs
|
||||
gcode:
|
||||
SET_PIN PIN=LED_Hotend VALUE=0
|
||||
|
||||
|
||||
[gcode_macro LED_LOGO_ON]
|
||||
description: Turn on Logo LEDs
|
||||
gcode:
|
||||
SET_PIN PIN=LED_Logo VALUE=1
|
||||
|
||||
|
||||
[gcode_macro LED_LOGO_OFF]
|
||||
description: Turn off Logo LEDs
|
||||
gcode:
|
||||
SET_PIN PIN=LED_Logo VALUE=0
|
||||
|
||||
|
||||
##################################################
|
||||
# Managing Slicer Controls
|
||||
##################################################
|
||||
|
||||
[gcode_macro M204]
|
||||
description: Sets maximum accelleration
|
||||
rename_existing: M204.1
|
||||
gcode:
|
||||
{% if 'S' in params %}
|
||||
{% set s = params.S|float %}
|
||||
SET_VELOCITY_LIMIT ACCEL={s}
|
||||
{% else %}
|
||||
{% if 'P' in params %}
|
||||
{% set p = params.P|float %}
|
||||
{% if 'T' in params %}
|
||||
{% set t = params.T|float %}
|
||||
{% if p < t %}
|
||||
SET_VELOCITY_LIMIT ACCEL={p}
|
||||
{% else %}
|
||||
SET_VELOCITY_LIMIT ACCEL={t}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
SET_VELOCITY_LIMIT ACCEL={p}
|
||||
{% endif %}
|
||||
{% elif 'T' in params %}
|
||||
{% set t = params.T|float %}
|
||||
SET_VELOCITY_LIMIT ACCEL={t}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro M205]
|
||||
description: Sets square corner velocity
|
||||
gcode:
|
||||
{% if 'X' in params %}
|
||||
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={params.X}
|
||||
{% elif 'Y' in params %}
|
||||
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={params.Y}
|
||||
{% endif %}
|
||||
|
||||
|
||||
##################################################
|
||||
# Managing Temperatures Controls
|
||||
##################################################
|
||||
|
||||
[gcode_macro M109]
|
||||
description: Managing extruder temperature
|
||||
rename_existing: M99109
|
||||
gcode:
|
||||
{% set s = params.S|float %}
|
||||
M104 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %}
|
||||
{% if s != 0 %}
|
||||
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={s} MAXIMUM={s+1}
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro M190]
|
||||
description: Managing bed temperature
|
||||
rename_existing: M99190
|
||||
gcode:
|
||||
{% set s = params.S|float %}
|
||||
M140 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %}
|
||||
{% if s != 0 %}
|
||||
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s} MAXIMUM={s+1}
|
||||
{% endif %}
|
||||
|
||||
|
||||
##################################################
|
||||
# Loading default bed mesh at startup
|
||||
##################################################
|
||||
|
||||
[delayed_gcode bed_mesh_init]
|
||||
initial_duration: .01
|
||||
gcode:
|
||||
BED_MESH_PROFILE LOAD=default
|
||||
|
||||
|
||||
##################################################
|
||||
# KNOMI
|
||||
##################################################
|
||||
|
||||
# Enable this section if Knomi is used
|
||||
|
||||
#[homing_override]
|
||||
#gcode:
|
||||
#SET_GCODE_VARIABLE MACRO=_KNOMI_STATUS VARIABLE=homing VALUE=True
|
||||
#G28
|
||||
#SET_GCODE_VARIABLE MACRO=_KNOMI_STATUS VARIABLE=homing VALUE=False
|
||||
|
||||
|
||||
#[gcode_macro _KNOMI_STATUS]
|
||||
#variable_homing: False
|
||||
#variable_probing: False
|
||||
#gcode:
|
||||
|
||||
|
||||
##################################################
|
||||
# Z-Offset Management
|
||||
##################################################
|
||||
|
||||
[gcode_macro SECURITY_OFFSET]
|
||||
description: Apply a 2mm Safety Offset
|
||||
gcode:
|
||||
SET_GCODE_OFFSET Z=+2
|
||||
RESPOND MSG="Safety Offset applied!"
|
||||
|
||||
|
||||
[gcode_macro SET_GCODE_OFFSET]
|
||||
description: Saving Z-Offset
|
||||
rename_existing: _SET_GCODE_OFFSET
|
||||
gcode:
|
||||
{% if printer.save_variables.variables.zoffset %}
|
||||
{% set zoffset = printer.save_variables.variables.zoffset %}
|
||||
{% else %}
|
||||
{% set zoffset = {'z': None} %}
|
||||
{% endif %}
|
||||
{% set ns = namespace(zoffset={'z': zoffset.z}) %}
|
||||
_SET_GCODE_OFFSET {% for p in params %}{'%s=%s '% (p, params[p])}{% endfor %}
|
||||
{%if 'Z' in params %}{% set null = ns.zoffset.update({'z': params.Z}) %}{% endif %}
|
||||
{%if 'Z_ADJUST' in params %}
|
||||
{%if ns.zoffset.z == None %}{% set null = ns.zoffset.update({'z': 0}) %}{% endif %}
|
||||
{% set null = ns.zoffset.update({'z': (ns.zoffset.z | float) + (params.Z_ADJUST | float)}) %}
|
||||
{% endif %}
|
||||
SAVE_VARIABLE VARIABLE=zoffset VALUE="{ns.zoffset}"
|
||||
|
||||
|
||||
[delayed_gcode LOAD_GCODE_OFFSETS]
|
||||
initial_duration: 2
|
||||
gcode:
|
||||
{% if printer.save_variables.variables.zoffset %}
|
||||
{% set zoffset = printer.save_variables.variables.zoffset %}
|
||||
_SET_GCODE_OFFSET {% for axis, offset in zoffset.items() if zoffset[axis] %}{ "%s=%s " % (axis, offset) }{% endfor %}
|
||||
RESPOND TYPE=command MSG="Loaded Z-Offset from variables.cfg: {zoffset.z}mm"
|
||||
{% endif %}
|
73
02-klipper/01-configuration/moonraker.conf
Normal file
73
02-klipper/01-configuration/moonraker.conf
Normal file
@ -0,0 +1,73 @@
|
||||
[server]
|
||||
host: 0.0.0.0
|
||||
port: 7125
|
||||
klippy_uds_address: /home/pi/printer_data/comms/klippy.sock
|
||||
|
||||
[authorization]
|
||||
trusted_clients:
|
||||
10.10.0.0/16
|
||||
10.0.0.0/8
|
||||
127.0.0.0/8
|
||||
169.254.0.0/16
|
||||
172.16.0.0/12
|
||||
192.168.0.0/16
|
||||
FE80::/10
|
||||
::1/128
|
||||
cors_domains:
|
||||
*.lan
|
||||
*.local
|
||||
*://localhost
|
||||
*://localhost:*
|
||||
*://my.mainsail.xyz
|
||||
*://app.fluidd.xyz
|
||||
|
||||
[octoprint_compat]
|
||||
|
||||
[history]
|
||||
|
||||
[machine]
|
||||
shutdown_action: halt
|
||||
|
||||
[timelapse]
|
||||
|
||||
[update_manager]
|
||||
channel: dev
|
||||
refresh_interval: 168
|
||||
|
||||
[update_manager mainsail]
|
||||
type: web
|
||||
channel: stable
|
||||
repo: mainsail-crew/mainsail
|
||||
path: ~/mainsail
|
||||
|
||||
[update_manager KlipperScreen]
|
||||
type: git_repo
|
||||
path: ~/KlipperScreen
|
||||
origin: https://github.com/Guilouz/KlipperScreen-Flsun-Speeder-Pad.git
|
||||
virtualenv: ~/.KlipperScreen-env
|
||||
requirements: scripts/KlipperScreen-requirements.txt
|
||||
system_dependencies: scripts/system-dependencies.json
|
||||
managed_services: KlipperScreen
|
||||
|
||||
[update_manager crowsnest]
|
||||
type: git_repo
|
||||
path: ~/crowsnest
|
||||
origin: https://github.com/mainsail-crew/crowsnest.git
|
||||
managed_services: crowsnest
|
||||
install_script: tools/pkglist.sh
|
||||
|
||||
[update_manager timelapse]
|
||||
type: git_repo
|
||||
primary_branch: main
|
||||
path: ~/moonraker-timelapse
|
||||
origin: https://github.com/mainsail-crew/moonraker-timelapse.git
|
||||
managed_services: klipper moonraker
|
||||
|
||||
[update_manager Klipper TMC Autotune]
|
||||
type: git_repo
|
||||
channel: dev
|
||||
path: ~/klipper_tmc_autotune
|
||||
origin: https://github.com/andrewmcgr/klipper_tmc_autotune.git
|
||||
managed_services: klipper
|
||||
primary_branch: main
|
||||
install_script: install.sh
|
228
02-klipper/01-configuration/neopixels.cfg
Normal file
228
02-klipper/01-configuration/neopixels.cfg
Normal file
@ -0,0 +1,228 @@
|
||||
# _ _ _ _
|
||||
# | \ | | (_) | |
|
||||
# | \| | ___ ___ _ __ ___ _____| |___
|
||||
# | . ` |/ _ \/ _ \| '_ \| \ \/ / _ \ / __|
|
||||
# | |\ | __/ (_) | |_) | |> < __/ \__ \
|
||||
# |_| \_|\___|\___/| .__/|_/_/\_\___|_|___/
|
||||
# | |
|
||||
# |_|
|
||||
#
|
||||
# Neopixels Configurations - Flsun Speeder Pad
|
||||
#
|
||||
# Guislain Cyril
|
||||
|
||||
|
||||
[gcode_macro NEOPIXEL_ON]
|
||||
description: Turn On Neopixels LEDs
|
||||
gcode:
|
||||
SET_LED_TEMPLATE LED=NeoPixels TEMPLATE=""
|
||||
SET_LED LED=NeoPixels RED=1.0 GREEN=1.0 BLUE=1.0 SYNC=0 TRANSMIT=1
|
||||
|
||||
|
||||
[gcode_macro NEOPIXEL_OFF]
|
||||
description: Turn Off Neopixels LEDs
|
||||
gcode:
|
||||
SET_LED_TEMPLATE LED=NeoPixels TEMPLATE=""
|
||||
SET_LED LED=NeoPixels RED=0.0 GREEN=0.0 BLUE=0.0 SYNC=0 TRANSMIT=1
|
||||
|
||||
|
||||
[gcode_macro NEOPIXEL_BLUE]
|
||||
description: Turn On Neopixels LEDs in blue
|
||||
gcode:
|
||||
SET_LED_TEMPLATE LED=NeoPixels TEMPLATE=""
|
||||
SET_LED LED=NeoPixels RED=0.0 GREEN=0.0 BLUE=1.0 SYNC=0 TRANSMIT=1
|
||||
|
||||
|
||||
[gcode_macro NEOPIXEL_RED]
|
||||
description: Turn On Neopixels LEDs in red
|
||||
gcode:
|
||||
SET_LED_TEMPLATE LED=NeoPixels TEMPLATE=""
|
||||
SET_LED LED=NeoPixels RED=1.0 GREEN=0.0 BLUE=0.0 SYNC=0 TRANSMIT=1
|
||||
|
||||
|
||||
[gcode_macro NEOPIXEL_GREEN]
|
||||
description: Turn On Neopixels LEDs in green
|
||||
gcode:
|
||||
SET_LED_TEMPLATE LED=NeoPixels TEMPLATE=""
|
||||
SET_LED LED=NeoPixels RED=0.0 GREEN=1.0 BLUE=0.0 SYNC=0 TRANSMIT=1
|
||||
|
||||
|
||||
[gcode_macro NEOPIXEL_YELLOW]
|
||||
description: Turn On Neopixels LEDs in yellow
|
||||
gcode:
|
||||
SET_LED_TEMPLATE LED=NeoPixels TEMPLATE=""
|
||||
SET_LED LED=NeoPixels RED=1.0 GREEN=1.0 BLUE=0.0 SYNC=0 TRANSMIT=1
|
||||
|
||||
|
||||
[gcode_macro NEOPIXEL_ORANGE]
|
||||
description: Turn On Neopixels LEDs in orange
|
||||
gcode:
|
||||
SET_LED_TEMPLATE LED=NeoPixels TEMPLATE=""
|
||||
SET_LED LED=NeoPixels RED=1.0 GREEN=0.31 BLUE=0.0 SYNC=0 TRANSMIT=1
|
||||
|
||||
|
||||
[gcode_macro NEOPIXEL_VIOLET]
|
||||
description: Turn On Neopixels LEDs in violet
|
||||
gcode:
|
||||
SET_LED_TEMPLATE LED=NeoPixels TEMPLATE=""
|
||||
SET_LED LED=NeoPixels RED=1.0 GREEN=0.0 BLUE=1.0 SYNC=0 TRANSMIT=1
|
||||
|
||||
|
||||
[gcode_macro HOTEND_GLOW]
|
||||
description: Turn on LEDs based on nozzle temperature (All LEDs)
|
||||
gcode:
|
||||
NEOPIXEL_DISPLAY LED=NeoPixels TYPE=extruder_temp MODE=glow
|
||||
|
||||
|
||||
[gcode_macro HOTEND_PROGRESS]
|
||||
description: Turn on LEDs based on nozzle temperature (LED by LED)
|
||||
gcode:
|
||||
NEOPIXEL_DISPLAY LED=NeoPixels TYPE=extruder_temp MODE=progress
|
||||
|
||||
|
||||
[gcode_macro BED_GLOW]
|
||||
description: Turn on the LEDs based on bed temperature (All LEDs)
|
||||
gcode:
|
||||
NEOPIXEL_DISPLAY LED=NeoPixels TYPE=bed_temp MODE=glow
|
||||
|
||||
|
||||
[gcode_macro BED_PROGRESS]
|
||||
description: Turn on the LEDs based on bed temperature (LED by LED)
|
||||
gcode:
|
||||
NEOPIXEL_DISPLAY LED=NeoPixels TYPE=bed_temp MODE=progress
|
||||
|
||||
|
||||
[gcode_macro PERCENT_GLOW]
|
||||
description: Turn on LEDs based on printing progress (All LEDs)
|
||||
gcode:
|
||||
NEOPIXEL_DISPLAY LED=NeoPixels TYPE=print_percent MODE=glow
|
||||
|
||||
|
||||
[gcode_macro PERCENT_PROGRESS]
|
||||
description: Turn on LEDs based on printing progress (LED by LED)
|
||||
gcode:
|
||||
NEOPIXEL_DISPLAY LED=NeoPixels TYPE=print_percent MODE=progress
|
||||
|
||||
|
||||
[gcode_macro SPEED_GLOW]
|
||||
description: Turn on LEDs based on printing speed (All LEDs)
|
||||
gcode:
|
||||
NEOPIXEL_DISPLAY LED=NeoPixels TYPE=printer_speed MODE=glow
|
||||
|
||||
|
||||
[gcode_macro SPEED_PROGRESS]
|
||||
description: Turn on LEDs based on printing speed (LED by LED)
|
||||
gcode:
|
||||
NEOPIXEL_DISPLAY LED=NeoPixels TYPE=printer_speed MODE=progress
|
||||
|
||||
|
||||
[gcode_macro NEOPIXEL_DISPLAY]
|
||||
gcode:
|
||||
{% set led = params.LED %}
|
||||
{% set type = params.TYPE %}
|
||||
{% set mode = params.MODE %}
|
||||
{% set my_neopixel = printer.configfile.config['neopixel ' ~ led] %}
|
||||
{% if mode == 'progress' %}
|
||||
{% for i in range(my_neopixel.chain_count|int) %}
|
||||
SET_LED_TEMPLATE LED={led} INDEX={i+1} TEMPLATE={'led_' ~ type ~ '_' ~ mode} param_led_num={i+1} param_led_total={my_neopixel.chain_count|int}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if mode == 'glow' %}
|
||||
SET_LED_TEMPLATE LED={led} TEMPLATE={'led_' ~ type ~ '_' ~ mode}
|
||||
{% endif %}
|
||||
|
||||
|
||||
[display_template led_extruder_temp_glow]
|
||||
text:
|
||||
{% if printer.extruder.target > 0.0 %}
|
||||
{% set temp = printer.extruder.target %}
|
||||
{% else %}
|
||||
{% set temp = printer.configfile.config.extruder.max_temp %}
|
||||
{% endif %}
|
||||
{% set ratio = printer.extruder.temperature / temp|float %}
|
||||
{ratio}, 0.0, {1-ratio}, 0.0
|
||||
|
||||
|
||||
[display_template led_extruder_temp_progress]
|
||||
param_led_num: 0
|
||||
param_led_total: 1
|
||||
text:
|
||||
{% if printer.extruder.target > 0.0 %}
|
||||
{% set temp = printer.extruder.target %}
|
||||
{% else %}
|
||||
{% set temp = printer.configfile.config.extruder.max_temp %}
|
||||
{% endif %}
|
||||
{% set ratio = printer.extruder.temperature / temp|float %}
|
||||
{% set led_ratio = param_led_num|float / param_led_total %}
|
||||
{% if ratio > led_ratio %}
|
||||
{led_ratio}, 0.0, 0.0, 0.0
|
||||
{% else %}
|
||||
0.0, 0.0, 0.0, 0.0
|
||||
{% endif %}
|
||||
|
||||
|
||||
[display_template led_bed_temp_glow]
|
||||
text:
|
||||
{% if printer.heater_bed.target > 0.0 %}
|
||||
{% set temp = printer.heater_bed.target %}
|
||||
{% else %}
|
||||
{% set temp = printer.configfile.config.heater_bed.max_temp %}
|
||||
{% endif %}
|
||||
{% set ratio = printer.heater_bed.temperature / temp|float %}
|
||||
{ratio}, 0.0, {1-ratio}, 0.0
|
||||
|
||||
|
||||
[display_template led_bed_temp_progress]
|
||||
param_led_num: 0
|
||||
param_led_total: 1
|
||||
text:
|
||||
{% if printer.heater_bed.target > 0.0 %}
|
||||
{% set temp = printer.heater_bed.target %}
|
||||
{% else %}
|
||||
{% set temp = printer.configfile.config.heater_bed.max_temp %}
|
||||
{% endif %}
|
||||
{% set ratio = printer.heater_bed.temperature / temp|float %}
|
||||
{% set led_ratio = param_led_num|float / param_led_total %}
|
||||
{% if ratio > led_ratio %}
|
||||
{led_ratio}, 0.0, 0.0, 0.0
|
||||
{% else %}
|
||||
0.0, 0.0, 0.0, 0.0
|
||||
{% endif %}
|
||||
|
||||
|
||||
[display_template led_print_percent_glow]
|
||||
text:
|
||||
{% set ratio = printer.virtual_sdcard.progress %}
|
||||
0.0, {ratio}, 0.0, 0.0
|
||||
|
||||
|
||||
[display_template led_print_percent_progress]
|
||||
param_led_num: 0
|
||||
param_led_total: 1
|
||||
text:
|
||||
{% set ratio = printer.virtual_sdcard.progress %}
|
||||
{% set led_ratio = param_led_num|float / param_led_total %}
|
||||
{% if ratio > led_ratio %}
|
||||
0.0, {led_ratio}, 0.0, 0.0
|
||||
{% else %}
|
||||
0.0, 0.0, 0.0, 0.0
|
||||
{% endif %}
|
||||
|
||||
|
||||
[display_template led_printer_speed_glow]
|
||||
text:
|
||||
{% set ratio = printer.motion_report.live_velocity|float / printer.configfile.config.printer.max_velocity|float %}
|
||||
0.0, {ratio}, 0.0, 0.0
|
||||
|
||||
|
||||
[display_template led_printer_speed_progress]
|
||||
param_led_num: 0
|
||||
param_led_total: 1
|
||||
text:
|
||||
{% set ratio = printer.motion_report.live_velocity|float / printer.configfile.config.printer.max_velocity|float %}
|
||||
{% set led_ratio = param_led_num|float / param_led_total %}
|
||||
{% if ratio > led_ratio %}
|
||||
0.0, {led_ratio}, 0.0, 0.0
|
||||
{% else %}
|
||||
0.0, 0.0, 0.0, 0.0
|
||||
{% endif %}
|
511
02-klipper/01-configuration/printer.cfg
Normal file
511
02-klipper/01-configuration/printer.cfg
Normal file
@ -0,0 +1,511 @@
|
||||
# _____ __ _ _ _
|
||||
# / ____| / _(_) | | (_)
|
||||
# | | ___ _ __ | |_ _ __ _ _ _ _ __ __ _| |_ _ ___ _ __ ___
|
||||
# | | / _ \| '_ \| _| |/ _` | | | | '__/ _` | __| |/ _ \| '_ \/ __|
|
||||
# | |___| (_) | | | | | | | (_| | |_| | | | (_| | |_| | (_) | | | \__ \
|
||||
# \_____\___/|_| |_|_| |_|\__, |\__,_|_| \__,_|\__|_|\___/|_| |_|___/
|
||||
# __/ |
|
||||
# |___/
|
||||
#
|
||||
# Klipper Configurations - Flsun V400
|
||||
# Version 4.0
|
||||
#
|
||||
# Guislain Cyril
|
||||
|
||||
|
||||
########################################
|
||||
# Firmware Settings
|
||||
########################################
|
||||
|
||||
# MKS Robin Nano V2.0
|
||||
|
||||
# When running "make menuconfig"
|
||||
#
|
||||
# [*] Enable extra low-level configuration options
|
||||
# Micro-controller Architecture (STMicroelectronics STM32) --->
|
||||
# Processor model (STM32F103) --->
|
||||
# [ ] Only 10KiB of RAM (for rare stm32f103x6 variant) (NEW)
|
||||
# [ ] Disable SWD at startup (for GigaDevice stm32f103 clones) (NEW)
|
||||
# Bootloader offset (28KiB bootloader) --->
|
||||
# Clock Reference (8 MHz crystal) --->
|
||||
# Communication interface (Serial (on USART3 PB11/PB10)) --->
|
||||
# (250000) Baud rate for serial port
|
||||
# () GPIO pins to set at micro-controller startup
|
||||
#
|
||||
# Note that the "make flash" command does not work with MKS Robin
|
||||
# boards. After running "make", run the following command:
|
||||
# ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano35.bin
|
||||
# Copy the file out/Robin_nano35.bin to an microSD card,
|
||||
# insert it in the printer and restart it.
|
||||
|
||||
|
||||
########################################
|
||||
# Editable Settings
|
||||
########################################
|
||||
|
||||
# Notes: Some settings can be enabled or disabled by removing or adding the '#' symbol
|
||||
#
|
||||
# PID (pid_Kp, pid_Ki, pid_Kd) --> [extruder] and [heater_bed] sections
|
||||
# E-Steps Extruder (rotation_distance) --> [extruder] section --> <rotation_distance> = <full_steps_per_rotation> * <microsteps> / <steps_per_mm>
|
||||
# Pressure Advance (pressure_advance) --> [extruder] section -- See: https://www.klipper3d.org/Pressure_Advance.html
|
||||
# Firmware Retraction --> [firmware_retraction] section -- Requires "Klipper Settings Plugin" for Cura -- See: https://github.com/jjgraphix/KlipperSettingsPlugin
|
||||
# ADXL345 function for resonance testing --> Enable/Disable [include adxl345_pico.cfg] or [include adxl345_fysetc.cfg] -- Configuration in [input_shaper] section -- See: https://www.klipper3d.org/Measuring_Resonances.html
|
||||
# NeoPixels macros --> Enable/Disable [include neopixels.cfg]
|
||||
# Timelapse function --> Enable/Disable [include timelapse.cfg]
|
||||
|
||||
|
||||
########################################
|
||||
# Included Files
|
||||
########################################
|
||||
|
||||
[include macros.cfg]
|
||||
#[include adxl345_pico.cfg] #Enable if you want to use ADXL with Rapsberry Pi Pico
|
||||
#[include adxl345_fysetc.cfg] #Enable if you want to use ADXL with Fysetc Portable Input Shaper
|
||||
[include timelapse.cfg] #Enable if you want to use Timelapse
|
||||
#[include neopixels.cfg] #Enable if you want to use some Neopixels macros
|
||||
|
||||
|
||||
########################################
|
||||
# Printer Settings
|
||||
########################################
|
||||
|
||||
[printer]
|
||||
kinematics: delta
|
||||
max_velocity: 600
|
||||
max_accel: 10000
|
||||
minimum_cruise_ratio: 0.5
|
||||
square_corner_velocity: 5
|
||||
max_z_velocity: 100
|
||||
max_z_accel: 1500
|
||||
minimum_z_position: -25
|
||||
print_radius: 152
|
||||
#delta_radius: 152
|
||||
|
||||
|
||||
########################################
|
||||
# X Stepper Motor & Driver Settings
|
||||
########################################
|
||||
|
||||
[stepper_a]
|
||||
step_pin: PE3
|
||||
dir_pin: PE2
|
||||
enable_pin: !PE4
|
||||
microsteps: 64 # If you encounter an error while measuring the resonances. Replace the microsteps to 16 just for the duration of the test.
|
||||
rotation_distance: 40
|
||||
endstop_pin: ^PA15
|
||||
homing_speed: 50
|
||||
homing_retract_dist: 5.0
|
||||
homing_retract_speed: 10
|
||||
#angle: 210
|
||||
#position_endstop: 415.0
|
||||
#arm_length = 345.0
|
||||
|
||||
[tmc2209 stepper_a]
|
||||
uart_pin: PD5
|
||||
run_current: 1.2
|
||||
interpolate: False
|
||||
stealthchop_threshold: 0
|
||||
|
||||
[autotune_tmc stepper_a] # Enable if Klipper TMC Autotune is used
|
||||
motor: flsun-v400-42
|
||||
tuning_goal: silent
|
||||
|
||||
|
||||
########################################
|
||||
# Y Stepper Motor & Driver Settings
|
||||
########################################
|
||||
|
||||
[stepper_b]
|
||||
step_pin: PE0
|
||||
dir_pin: PB9
|
||||
enable_pin: !PE1
|
||||
microsteps: 64 # If you encounter an error while measuring the resonances. Replace the microsteps to 16 just for the duration of the test.
|
||||
rotation_distance: 40
|
||||
endstop_pin: ^PA12
|
||||
#angle: 330
|
||||
|
||||
[tmc2209 stepper_b]
|
||||
uart_pin: PD7
|
||||
run_current: 1.2
|
||||
interpolate: False
|
||||
stealthchop_threshold: 0
|
||||
|
||||
[autotune_tmc stepper_b] # Enable if Klipper TMC Autotune is used
|
||||
motor: flsun-v400-42
|
||||
tuning_goal: silent
|
||||
|
||||
|
||||
########################################
|
||||
# Z Stepper Motor & Driver Settings
|
||||
########################################
|
||||
|
||||
[stepper_c]
|
||||
step_pin: PB5
|
||||
dir_pin: PB4
|
||||
enable_pin: !PB8
|
||||
microsteps: 64 # If you encounter an error while measuring the resonances. Replace the microsteps to 16 just for the duration of the test.
|
||||
rotation_distance: 40
|
||||
endstop_pin: ^PC4
|
||||
#angle: 90
|
||||
|
||||
[tmc2209 stepper_c]
|
||||
uart_pin: PD4
|
||||
run_current: 1.2
|
||||
interpolate: False
|
||||
stealthchop_threshold: 0
|
||||
|
||||
[autotune_tmc stepper_c] # Enable if Klipper TMC Autotune is used
|
||||
motor: flsun-v400-42
|
||||
tuning_goal: silent
|
||||
|
||||
|
||||
########################################
|
||||
# Extruder & Driver Settings
|
||||
########################################
|
||||
|
||||
[extruder]
|
||||
step_pin: PD6
|
||||
dir_pin: !PD3
|
||||
enable_pin: !PB3
|
||||
microsteps: 16
|
||||
rotation_distance: 4.5
|
||||
nozzle_diameter: 0.400
|
||||
filament_diameter: 1.750
|
||||
heater_pin: PC3
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
sensor_pin: PC1
|
||||
min_temp: -5
|
||||
max_temp: 315
|
||||
max_extrude_cross_section: 50
|
||||
max_extrude_only_distance: 800
|
||||
#pressure_advance: 0.04
|
||||
#pressure_advance_smooth_time: 0.040
|
||||
#control = pid
|
||||
#pid_kp = 17.501
|
||||
#pid_ki = 0.711
|
||||
#pid_kd = 107.630
|
||||
|
||||
[tmc2209 extruder]
|
||||
uart_pin: PD9
|
||||
run_current: 0.900
|
||||
interpolate: True
|
||||
stealthchop_threshold: 0
|
||||
|
||||
[autotune_tmc extruder] # Enable if Klipper TMC Autotune is used
|
||||
motor: flsun-v400-36
|
||||
tuning_goal: performance
|
||||
|
||||
|
||||
########################################
|
||||
# Bed Settings
|
||||
########################################
|
||||
|
||||
[heater_bed]
|
||||
heater_pin: PA0
|
||||
sensor_pin: PC0
|
||||
sensor_type: EPCOS 100K B57560G104F
|
||||
min_temp: -5
|
||||
max_temp: 120
|
||||
#control = pid
|
||||
#pid_kp = 64.044
|
||||
#pid_ki = 3.812
|
||||
#pid_kd = 268.984
|
||||
|
||||
|
||||
########################################
|
||||
# Filament Sensor Settings
|
||||
########################################
|
||||
|
||||
[filament_switch_sensor filament_sensor]
|
||||
pause_on_runout: True
|
||||
runout_gcode: M600
|
||||
switch_pin: PA4
|
||||
|
||||
|
||||
########################################
|
||||
# Fans Settings
|
||||
########################################
|
||||
|
||||
[fan]
|
||||
pin: PB1
|
||||
|
||||
[heater_fan Hotend]
|
||||
pin: PB0
|
||||
heater_temp: 50.0
|
||||
|
||||
|
||||
########################################
|
||||
# Probe Settings
|
||||
########################################
|
||||
|
||||
[probe]
|
||||
pin: !PA11
|
||||
x_offset: 0
|
||||
y_offset: 0
|
||||
#z_offset: 0
|
||||
speed: 10
|
||||
lift_speed: 50
|
||||
samples: 8
|
||||
samples_result: average
|
||||
sample_retract_dist: 10
|
||||
samples_tolerance: 0.02
|
||||
samples_tolerance_retries: 7
|
||||
|
||||
|
||||
########################################
|
||||
# Delta Calibration & Mesh Settings
|
||||
########################################
|
||||
|
||||
[delta_calibrate]
|
||||
radius: 147
|
||||
horizontal_move_z: 30
|
||||
speed: 50
|
||||
|
||||
[bed_mesh]
|
||||
speed: 50
|
||||
horizontal_move_z: 30
|
||||
mesh_radius: 147
|
||||
mesh_origin: 0,0
|
||||
mesh_pps: 2,2
|
||||
round_probe_count: 13
|
||||
algorithm: bicubic
|
||||
bicubic_tension: 0.1
|
||||
move_check_distance: 3
|
||||
zero_reference_position: 0,0
|
||||
fade_start: 1
|
||||
fade_end: 30
|
||||
|
||||
|
||||
########################################
|
||||
# Temperature Controls
|
||||
########################################
|
||||
|
||||
[verify_heater extruder]
|
||||
max_error: 160
|
||||
heating_gain: 1
|
||||
|
||||
[verify_heater heater_bed]
|
||||
max_error: 120
|
||||
heating_gain: 1
|
||||
|
||||
|
||||
########################################
|
||||
# Firmware Retraction Settings
|
||||
########################################
|
||||
|
||||
[firmware_retraction]
|
||||
retract_length: 0.7
|
||||
retract_speed: 40
|
||||
unretract_extra_length: 0.05
|
||||
unretract_speed: 40
|
||||
|
||||
|
||||
########################################
|
||||
# Input Shaper Settings
|
||||
########################################
|
||||
|
||||
[input_shaper]
|
||||
shaper_freq_x: 38.6
|
||||
shaper_type_x = mzv
|
||||
shaper_freq_y: 45
|
||||
shaper_type_y = ei
|
||||
|
||||
|
||||
########################################
|
||||
# G-Code Macros & Events
|
||||
########################################
|
||||
|
||||
[idle_timeout]
|
||||
timeout: 1800
|
||||
|
||||
[save_variables]
|
||||
filename: ~/printer_data/config/variables.cfg
|
||||
|
||||
[gcode_arcs]
|
||||
resolution: 0.1
|
||||
|
||||
[pause_resume]
|
||||
|
||||
[display_status]
|
||||
|
||||
[respond]
|
||||
|
||||
[exclude_object]
|
||||
|
||||
[virtual_sdcard]
|
||||
path: ~/printer_data/gcodes
|
||||
|
||||
[endstop_phase stepper_a]
|
||||
endstop_align_zero: False
|
||||
|
||||
[endstop_phase stepper_b]
|
||||
endstop_align_zero: False
|
||||
|
||||
[endstop_phase stepper_c]
|
||||
endstop_align_zero: False
|
||||
|
||||
|
||||
########################################
|
||||
# MCU Settings
|
||||
########################################
|
||||
|
||||
[mcu]
|
||||
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
|
||||
restart_method: command
|
||||
|
||||
[temperature_sensor Speeder_Pad]
|
||||
sensor_type: temperature_host
|
||||
min_temp: 10
|
||||
max_temp: 100
|
||||
|
||||
[temperature_sensor Motherboard]
|
||||
sensor_type: temperature_mcu
|
||||
min_temp: 0
|
||||
max_temp: 100
|
||||
|
||||
|
||||
########################################
|
||||
# LED Settings
|
||||
########################################
|
||||
|
||||
[output_pin LED_Hotend]
|
||||
pin: PE12
|
||||
pwm: False
|
||||
value: 0
|
||||
|
||||
[output_pin LED_Logo]
|
||||
pin: PD11
|
||||
pwm: False
|
||||
value: 1
|
||||
|
||||
#[neopixel NeoPixels]
|
||||
#pin: PB2
|
||||
#chain_count: 34
|
||||
#color_order: GRB
|
||||
#initial_RED: 1.0
|
||||
#initial_GREEN: 1.0
|
||||
#initial_BLUE: 1.0
|
||||
|
||||
#*# <---------------------- SAVE_CONFIG ---------------------->
|
||||
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
|
||||
#*#
|
||||
#*# [probe]
|
||||
#*# z_offset = 17.828
|
||||
#*#
|
||||
#*# [endstop_phase stepper_a]
|
||||
#*# trigger_phase = 77/256
|
||||
#*#
|
||||
#*# [endstop_phase stepper_b]
|
||||
#*# trigger_phase = 254/256
|
||||
#*#
|
||||
#*# [endstop_phase stepper_c]
|
||||
#*# trigger_phase = 207/256
|
||||
#*#
|
||||
#*# [printer]
|
||||
#*# delta_radius = 162.002474
|
||||
#*#
|
||||
#*# [stepper_a]
|
||||
#*# angle = 209.973682
|
||||
#*# arm_length = 344.755561
|
||||
#*# position_endstop = 419.986098
|
||||
#*#
|
||||
#*# [stepper_b]
|
||||
#*# angle = 329.779050
|
||||
#*# arm_length = 344.988509
|
||||
#*# position_endstop = 420.533328
|
||||
#*#
|
||||
#*# [stepper_c]
|
||||
#*# angle = 90.000000
|
||||
#*# arm_length = 345.350100
|
||||
#*# position_endstop = 419.275934
|
||||
#*#
|
||||
#*# [bed_mesh default]
|
||||
#*# version = 1
|
||||
#*# points =
|
||||
#*# -0.042722, -0.042722, -0.042722, -0.042722, -0.042722, -0.042722, -0.042722, -0.042722, -0.042722, -0.042722, -0.042722, -0.042722, -0.042722
|
||||
#*# -0.103985, -0.103985, -0.103985, -0.103985, -0.092863, -0.041497, -0.029735, -0.024573, -0.009876, 0.303776, 0.303776, 0.303776, 0.303776
|
||||
#*# -0.107217, -0.107217, -0.107217, -0.095680, -0.078747, -0.041636, -0.027165, 0.001847, 0.040765, 0.030959, -0.001207, -0.001207, -0.001207
|
||||
#*# -0.020548, -0.020548, -0.030235, -0.045109, -0.047644, -0.013968, 0.004580, -0.022084, -0.040851, -0.010745, -0.072567, -0.046700, -0.046700
|
||||
#*# -0.065225, -0.065225, -0.070452, -0.082613, -0.004947, -0.007693, 0.002972, -0.017327, 0.006928, -0.000043, -0.022182, -0.051542, -0.051542
|
||||
#*# -0.015597, -0.015597, -0.024245, -0.016206, 0.017731, 0.011087, -0.007589, 0.014521, -0.014740, -0.055408, -0.078663, -0.128265, -0.128265
|
||||
#*# -0.006361, -0.035030, -0.027430, -0.027100, -0.035687, 0.008191, 0.000000, 0.028685, -0.013501, -0.000669, -0.006836, -0.063614, -0.120604
|
||||
#*# 0.009006, 0.009006, -0.038215, -0.004862, -0.005067, 0.023846, 0.005303, -0.017008, -0.001132, -0.047883, -0.078197, -0.104467, -0.104467
|
||||
#*# -0.065296, -0.065296, -0.094076, -0.050048, 0.005887, 0.029406, 0.012646, -0.001847, 0.042902, 0.015198, -0.038658, -0.069033, -0.069033
|
||||
#*# -0.089840, -0.089840, -0.067392, -0.046851, -0.046780, 0.008230, -0.024958, 0.005470, 0.000727, 0.014177, -0.031855, -0.067485, -0.067485
|
||||
#*# -0.142119, -0.142119, -0.142119, -0.132495, -0.062554, -0.045859, -0.002144, 0.021794, 0.012583, 0.032188, -0.027538, -0.027538, -0.027538
|
||||
#*# -0.150265, -0.150265, -0.150265, -0.150265, -0.090845, -0.036079, -0.013544, 0.013161, 0.011777, 0.039157, 0.039157, 0.039157, 0.039157
|
||||
#*# 0.005246, 0.005246, 0.005246, 0.005246, 0.005246, 0.005246, 0.005246, 0.005246, 0.005246, 0.005246, 0.005246, 0.005246, 0.005246
|
||||
#*# x_count = 13
|
||||
#*# y_count = 13
|
||||
#*# mesh_x_pps = 2
|
||||
#*# mesh_y_pps = 2
|
||||
#*# algo = bicubic
|
||||
#*# tension = 0.1
|
||||
#*# min_x = -147.0
|
||||
#*# max_x = 147.0
|
||||
#*# min_y = -147.0
|
||||
#*# max_y = 147.0
|
||||
#*#
|
||||
#*# [heater_bed]
|
||||
#*# control = pid
|
||||
#*# pid_kp = 71.685
|
||||
#*# pid_ki = 2.583
|
||||
#*# pid_kd = 497.313
|
||||
#*#
|
||||
#*# [extruder]
|
||||
#*# control = pid
|
||||
#*# pid_kp = 20.836
|
||||
#*# pid_ki = 1.187
|
||||
#*# pid_kd = 91.417
|
||||
#*#
|
||||
#*# [delta_calibrate]
|
||||
#*# height0 = 17.828
|
||||
#*# height0_pos = 128669.000,128669.000,128669.000
|
||||
#*# height1 = 17.828
|
||||
#*# height1_pos = 151185.800,151185.800,116034.600
|
||||
#*# height2 = 17.828
|
||||
#*# height2_pos = 126085.200,163987.400,126085.200
|
||||
#*# height3 = 17.828
|
||||
#*# height3_pos = 116703.400,147524.800,147524.800
|
||||
#*# height4 = 17.828
|
||||
#*# height4_pos = 125485.400,125485.400,152772.600
|
||||
#*# height5 = 17.828
|
||||
#*# height5_pos = 144289.000,117535.400,144289.000
|
||||
#*# height6 = 17.828
|
||||
#*# height6_pos = 158014.000,125724.800,125724.800
|
||||
#*# distance0 = 64.842
|
||||
#*# distance0_pos1 = 133621.315,134972.482,134563.893
|
||||
#*# distance0_pos2 = 125491.344,143400.833,143020.320
|
||||
#*# distance1 = 65.035
|
||||
#*# distance1_pos1 = 134001.019,134206.848,134948.991
|
||||
#*# distance1_pos2 = 131041.776,131235.496,149780.315
|
||||
#*# distance2 = 64.878
|
||||
#*# distance2_pos1 = 134766.662,133828.010,134563.893
|
||||
#*# distance2_pos2 = 143208.928,125698.066,143020.320
|
||||
#*# distance3 = 64.88
|
||||
#*# distance3_pos1 = 135152.650,134210.345,133798.242
|
||||
#*# distance3_pos2 = 149983.962,131287.939,130851.341
|
||||
#*# distance4 = 64.945
|
||||
#*# distance4_pos1 = 134768.441,134976.007,133417.655
|
||||
#*# distance4_pos2 = 143239.022,143460.477,125287.675
|
||||
#*# distance5 = 64.858
|
||||
#*# distance5_pos1 = 134002.784,135359.341,133798.242
|
||||
#*# distance5_pos2 = 131068.237,150190.619,130851.341
|
||||
#*# distance6 = 64.892
|
||||
#*# distance6_pos1 = 126122.444,141650.703,142514.843
|
||||
#*# distance6_pos2 = 131635.229,130719.895,149144.094
|
||||
#*# distance7 = 64.988
|
||||
#*# distance7_pos1 = 131709.573,130794.251,147886.148
|
||||
#*# distance7_pos2 = 143462.253,125909.898,142015.038
|
||||
#*# distance8 = 65.122
|
||||
#*# distance8_pos1 = 142705.473,126331.599,141267.714
|
||||
#*# distance8_pos2 = 149348.788,131881.624,130333.916
|
||||
#*# distance9 = 65.015
|
||||
#*# distance9_pos1 = 148090.827,131953.425,130406.602
|
||||
#*# distance9_pos2 = 142233.571,143711.016,125497.896
|
||||
#*# distance10 = 65.185
|
||||
#*# distance10_pos1 = 141485.169,142950.990,125919.593
|
||||
#*# distance10_pos2 = 130549.893,149552.325,131444.874
|
||||
#*# distance11 = 65.11800000000001
|
||||
#*# distance11_pos1 = 130621.733,148294.415,131518.365
|
||||
#*# distance11_pos2 = 125700.751,142395.888,143272.712
|
427
02-klipper/01-configuration/timelapse.cfg
Normal file
427
02-klipper/01-configuration/timelapse.cfg
Normal file
@ -0,0 +1,427 @@
|
||||
# Timelapse klipper macro definition
|
||||
#
|
||||
# Copyright (C) 2021 Christoph Frei <fryakatkop@gmail.com>
|
||||
# Copyright (C) 2021 Alex Zellner <alexander.zellner@googlemail.com>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license
|
||||
#
|
||||
# Macro version 1.15
|
||||
#
|
||||
|
||||
##### DO NOT CHANGE ANY MACRO!!! #####
|
||||
|
||||
##########################################################################
|
||||
# #
|
||||
# GET_TIMELAPSE_SETUP: Print the Timelapse setup to console #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
[gcode_macro GET_TIMELAPSE_SETUP]
|
||||
description: Print the Timelapse setup
|
||||
gcode:
|
||||
{% set tl = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %}
|
||||
{% set output_txt = ["Timelapse Setup:"] %}
|
||||
{% set _dummy = output_txt.append("enable: %s" % tl.enable) %}
|
||||
{% set _dummy = output_txt.append("park: %s" % tl.park.enable) %}
|
||||
{% if tl.park.enable %}
|
||||
{% set _dummy = output_txt.append("park position: %s time: %s s" % (tl.park.pos, tl.park.time)) %}
|
||||
{% set _dummy = output_txt.append("park cord x:%s y:%s dz:%s" % (tl.park.coord.x, tl.park.coord.y, tl.park.coord.dz)) %}
|
||||
{% set _dummy = output_txt.append("travel speed: %s mm/s" % tl.speed.travel) %}
|
||||
{% endif %}
|
||||
{% set _dummy = output_txt.append("fw_retract: %s" % tl.extruder.fw_retract) %}
|
||||
{% if not tl.extruder.fw_retract %}
|
||||
{% set _dummy = output_txt.append("retract: %s mm speed: %s mm/s" % (tl.extruder.retract, tl.speed.retract)) %}
|
||||
{% set _dummy = output_txt.append("extrude: %s mm speed: %s mm/s" % (tl.extruder.extrude, tl.speed.extrude)) %}
|
||||
{% endif %}
|
||||
{% set _dummy = output_txt.append("verbose: %s" % tl.verbose) %}
|
||||
{action_respond_info(output_txt|join("\n"))}
|
||||
|
||||
################################################################################################
|
||||
# #
|
||||
# Use _SET_TIMELAPSE_SETUP [ENABLE=value] [VERBOSE=value] [PARK_ENABLE=value] [PARK_POS=value] #
|
||||
# [PARK_TIME=value] [CUSTOM_POS_X=value] [CUSTOM_POS_Y=value] #
|
||||
# [CUSTOM_POS_DZ=value][TRAVEL_SPEED=value] [RETRACT_SPEED=value] #
|
||||
# [EXTRUDE_SPEED=value] [EXTRUDE_DISTANCE=value] #
|
||||
# [RETRACT_DISTANCE=value] [FW_RETRACT=value] #
|
||||
# #
|
||||
################################################################################################
|
||||
|
||||
[gcode_macro _SET_TIMELAPSE_SETUP]
|
||||
description: Set user parameters for timelapse
|
||||
gcode:
|
||||
{% set tl = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %}
|
||||
##### get min and max bed size #####
|
||||
{% set min = printer.toolhead.axis_minimum %}
|
||||
{% set max = printer.toolhead.axis_maximum %}
|
||||
{% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
|
||||
else False %}
|
||||
{% set park = {'min' : {'x': (min.x / 1.42)|round(3) if round_bed else min.x|round(3),
|
||||
'y': (min.y / 1.42)|round(3) if round_bed else min.y|round(3)},
|
||||
'max' : {'x': (max.x / 1.42)|round(3) if round_bed else max.x|round(3),
|
||||
'y': (max.y / 1.42)|round(3) if round_bed else max.y|round(3)},
|
||||
'center': {'x': (max.x-(max.x-min.x)/2)|round(3),
|
||||
'y': (max.y-(max.y-min.y)/2)|round(3)}} %}
|
||||
##### set new values #####
|
||||
{% if params.ENABLE %}
|
||||
{% if params.ENABLE|lower is in ['true', 'false'] %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=enable VALUE={True if params.ENABLE|lower == 'true' else False}
|
||||
{% else %}
|
||||
{action_raise_error("ENABLE=%s not supported. Allowed values are [True, False]" % params.ENABLE|capitalize)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.VERBOSE %}
|
||||
{% if params.VERBOSE|lower is in ['true', 'false'] %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=verbose VALUE={True if params.VERBOSE|lower == 'true' else False}
|
||||
{% else %}
|
||||
{action_raise_error("VERBOSE=%s not supported. Allowed values are [True, False]" % params.VERBOSE|capitalize)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.CUSTOM_POS_X %}
|
||||
{% if params.CUSTOM_POS_X|float >= min.x and params.CUSTOM_POS_X|float <= max.x %}
|
||||
{% set _dummy = tl.park.custom.update({'x':params.CUSTOM_POS_X|float|round(3)}) %}
|
||||
{% else %}
|
||||
{action_raise_error("CUSTOM_POS_X=%s must be within [%s - %s]" % (params.CUSTOM_POS_X, min.x, max.x))}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.CUSTOM_POS_Y %}
|
||||
{% if params.CUSTOM_POS_Y|float >= min.y and params.CUSTOM_POS_Y|float <= max.y %}
|
||||
{% set _dummy = tl.park.custom.update({'y':params.CUSTOM_POS_Y|float|round(3)}) %}
|
||||
{% else %}
|
||||
{action_raise_error("CUSTOM_POS_Y=%s must be within [%s - %s]" % (params.CUSTOM_POS_Y, min.y, max.y))}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.CUSTOM_POS_DZ %}
|
||||
{% if params.CUSTOM_POS_DZ|float >= min.z and params.CUSTOM_POS_DZ|float <= max.z %}
|
||||
{% set _dummy = tl.park.custom.update({'dz':params.CUSTOM_POS_DZ|float|round(3)}) %}
|
||||
{% else %}
|
||||
{action_raise_error("CUSTOM_POS_DZ=%s must be within [%s - %s]" % (params.CUSTOM_POS_DZ, min.z, max.z))}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.PARK_ENABLE %}
|
||||
{% if params.PARK_ENABLE|lower is in ['true', 'false'] %}
|
||||
{% set _dummy = tl.park.update({'enable':True if params.PARK_ENABLE|lower == 'true' else False}) %}
|
||||
{% else %}
|
||||
{action_raise_error("PARK_ENABLE=%s not supported. Allowed values are [True, False]" % params.PARK_ENABLE|capitalize)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.PARK_POS %}
|
||||
{% if params.PARK_POS|lower is in ['center','front_left','front_right','back_left','back_right','custom','x_only','y_only'] %}
|
||||
{% set dic = {'center' : {'x': park.center.x , 'y': park.center.y , 'dz': 1 },
|
||||
'front_left' : {'x': park.min.x , 'y': park.min.y , 'dz': 0 },
|
||||
'front_right' : {'x': park.max.x , 'y': park.min.y , 'dz': 0 },
|
||||
'back_left' : {'x': park.min.x , 'y': park.max.y , 'dz': 0 },
|
||||
'back_right' : {'x': park.max.x , 'y': park.max.y , 'dz': 0 },
|
||||
'custom' : {'x': tl.park.custom.x, 'y': tl.park.custom.y, 'dz': tl.park.custom.dz},
|
||||
'x_only' : {'x': tl.park.custom.x, 'y': 'none' , 'dz': tl.park.custom.dz},
|
||||
'y_only' : {'x': 'none' , 'y': tl.park.custom.y, 'dz': tl.park.custom.dz}} %}
|
||||
{% set _dummy = tl.park.update({'pos':params.PARK_POS|lower}) %}
|
||||
{% set _dummy = tl.park.update({'coord':dic[tl.park.pos]}) %}
|
||||
{% else %}
|
||||
{action_raise_error("PARK_POS=%s not supported. Allowed values are [CENTER, FRONT_LEFT, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, CUSTOM, X_ONLY, Y_ONLY]"
|
||||
% params.PARK_POS|upper)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.PARK_TIME %}
|
||||
{% if params.PARK_TIME|float >= 0.0 %}
|
||||
{% set _dummy = tl.park.update({'time':params.PARK_TIME|float|round(3)}) %}
|
||||
{% else %}
|
||||
{action_raise_error("PARK_TIME=%s must be a positive number" % params.PARK_TIME)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=park VALUE="{tl.park}"
|
||||
{% if params.TRAVEL_SPEED %}
|
||||
{% if params.TRAVEL_SPEED|float > 0.0 %}
|
||||
{% set _dummy = tl.speed.update({'travel':params.TRAVEL_SPEED|float|round(3)}) %}
|
||||
{% else %}
|
||||
{action_raise_error("TRAVEL_SPEED=%s must be larger than 0" % params.TRAVEL_SPEED)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.RETRACT_SPEED %}
|
||||
{% if params.RETRACT_SPEED|float > 0.0 %}
|
||||
{% set _dummy = tl.speed.update({'retract':params.RETRACT_SPEED|float|round(3)}) %}
|
||||
{% else %}
|
||||
{action_raise_error("RETRACT_SPEED=%s must be larger than 0" % params.RETRACT_SPEED)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.EXTRUDE_SPEED %}
|
||||
{% if params.EXTRUDE_SPEED|float > 0.0 %}
|
||||
{% set _dummy = tl.speed.update({'extrude':params.EXTRUDE_SPEED|float|round(3)}) %}
|
||||
{% else %}
|
||||
{action_raise_error("EXTRUDE_SPEED=%s must be larger than 0" % params.EXTRUDE_SPEED)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=speed VALUE="{tl.speed}"
|
||||
{% if params.EXTRUDE_DISTANCE %}
|
||||
{% if params.EXTRUDE_DISTANCE|float >= 0.0 %}
|
||||
{% set _dummy = tl.extruder.update({'extrude':params.EXTRUDE_DISTANCE|float|round(3)}) %}
|
||||
{% else %}
|
||||
{action_raise_error("EXTRUDE_DISTANCE=%s must be specified as positiv number" % params.EXTRUDE_DISTANCE)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.RETRACT_DISTANCE %}
|
||||
{% if params.RETRACT_DISTANCE|float >= 0.0 %}
|
||||
{% set _dummy = tl.extruder.update({'retract':params.RETRACT_DISTANCE|float|round(3)}) %}
|
||||
{% else %}
|
||||
{action_raise_error("RETRACT_DISTANCE=%s must be specified as positiv number" % params.RETRACT_DISTANCE)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if params.FW_RETRACT %}
|
||||
{% if params.FW_RETRACT|lower is in ['true', 'false'] %}
|
||||
{% if 'firmware_retraction' in printer.configfile.settings %}
|
||||
{% set _dummy = tl.extruder.update({'fw_retract': True if params.FW_RETRACT|lower == 'true' else False}) %}
|
||||
{% else %}
|
||||
{% set _dummy = tl.extruder.update({'fw_retract':False}) %}
|
||||
{% if params.FW_RETRACT|capitalize == 'True' %}
|
||||
{action_raise_error("[firmware_retraction] not defined in printer.cfg. Can not enable fw_retract")}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{action_raise_error("FW_RETRACT=%s not supported. Allowed values are [True, False]" % params.FW_RETRACT|capitalize)}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=extruder VALUE="{tl.extruder}"
|
||||
{% if printer.configfile.settings['gcode_macro pause'] is defined %}
|
||||
{% set _dummy = tl.macro.update({'pause': printer.configfile.settings['gcode_macro pause'].rename_existing}) %}
|
||||
{% endif %}
|
||||
{% if printer.configfile.settings['gcode_macro resume'] is defined %}
|
||||
{% set _dummy = tl.macro.update({'resume': printer.configfile.settings['gcode_macro resume'].rename_existing}) %}
|
||||
{% endif %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=macro VALUE="{tl.macro}"
|
||||
|
||||
##########################################################################
|
||||
# #
|
||||
# TIMELAPSE_TAKE_FRAME: take the next picture #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
######################### definition #########################
|
||||
## enable: enable or disable the next frame. Valid inputs: [True, False]
|
||||
## takingframe: internal use. Valid inputs: [True, False]
|
||||
##
|
||||
## park.enable: enable or disable to park the head while taking a picture. Valid inputs: [True, False]
|
||||
## park.pos : used position for parking. Valid inputs: [center, front_left, front_right, back_left, back_right, custom, x_only, y_only]
|
||||
## park.time : used for the debug macro. Time in s
|
||||
## park.custom.x, park.custom.y: coordinates of the custom parkposition. Unit [mm]
|
||||
## park.custom.dz : custom z hop for the picture. Unit [mm]
|
||||
## park.coord : internal use
|
||||
##
|
||||
## extruder.fw_retract: enable disable fw retraction [True,False]
|
||||
## extruder.extrude : filament extruded at the end of park. Unit [mm]
|
||||
## extruder.retract : filament retract at the start of park. Unit [mm]
|
||||
##
|
||||
## speed.travel : used speed for travel from and to the park positon. Unit: [mm/min]
|
||||
## speed.retract: used speed for retract [mm/min]
|
||||
## speed.extrude: used speed for extrude [mm/min]
|
||||
##
|
||||
## verbose: Enable mesage output of TIMELAPSE_TAKE_FRAME
|
||||
##
|
||||
## check_time: time when the status of the taken picture is checked. Default 0.5 sec
|
||||
##
|
||||
## restore.absolute.coordinates: internal use
|
||||
## restore.absolute.extrude : internal use
|
||||
## restore.speed : internal use
|
||||
## restore.e : internal use
|
||||
## restore.factor.speed : internal use
|
||||
## restore.factor.extrude : internal use
|
||||
##
|
||||
## macro.pause : internal use
|
||||
## macro.resume : internal use
|
||||
##
|
||||
## is_paused: internal use
|
||||
###############################################################
|
||||
[gcode_macro TIMELAPSE_TAKE_FRAME]
|
||||
description: Take Timelapse shoot
|
||||
variable_enable: False
|
||||
variable_takingframe: False
|
||||
variable_park: {'enable': False,
|
||||
'pos' : 'center',
|
||||
'time' : 0.1,
|
||||
'custom': {'x': 0, 'y': 0, 'dz': 0},
|
||||
'coord' : {'x': 0, 'y': 0, 'dz': 0}}
|
||||
variable_extruder: {'fw_retract': False,
|
||||
'retract': 1.0,
|
||||
'extrude': 1.0}
|
||||
variable_speed: {'travel': 100,
|
||||
'retract': 15,
|
||||
'extrude': 15}
|
||||
variable_verbose: True
|
||||
variable_check_time: 0.5
|
||||
variable_restore: {'absolute': {'coordinates': True, 'extrude': True}, 'speed': 1500, 'e':0, 'factor': {'speed': 1.0, 'extrude': 1.0}}
|
||||
variable_macro: {'pause': 'PAUSE', 'resume': 'RESUME'}
|
||||
variable_is_paused: False
|
||||
gcode:
|
||||
{% set hyperlapse = True if params.HYPERLAPSE and params.HYPERLAPSE|lower =='true' else False %}
|
||||
{% if enable %}
|
||||
{% if (hyperlapse and printer['gcode_macro HYPERLAPSE'].run) or
|
||||
(not hyperlapse and not printer['gcode_macro HYPERLAPSE'].run) %}
|
||||
{% if park.enable %}
|
||||
{% set pos = {'x': 'X' + park.coord.x|string if park.pos != 'y_only' else '',
|
||||
'y': 'Y' + park.coord.y|string if park.pos != 'x_only' else '',
|
||||
'z': 'Z'+ [printer.gcode_move.gcode_position.z + park.coord.dz, printer.toolhead.axis_maximum.z]|min|string} %}
|
||||
{% set restore = {'absolute': {'coordinates': printer.gcode_move.absolute_coordinates,
|
||||
'extrude' : printer.gcode_move.absolute_extrude},
|
||||
'speed' : printer.gcode_move.speed,
|
||||
'e' : printer.gcode_move.gcode_position.e,
|
||||
'factor' : {'speed' : printer.gcode_move.speed_factor,
|
||||
'extrude': printer.gcode_move.extrude_factor}} %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=restore VALUE="{restore}"
|
||||
{% if not printer[printer.toolhead.extruder].can_extrude %}
|
||||
{% if verbose %}{action_respond_info("Timelapse: Warning, minimum extruder temperature not reached!")}{% endif %}
|
||||
{% else %}
|
||||
{% if extruder.fw_retract %}
|
||||
G10
|
||||
{% else %}
|
||||
M83 ; insure relative extrusion
|
||||
G0 E-{extruder.retract} F{speed.retract * 60}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=is_paused VALUE=True
|
||||
{macro.pause} ; execute the klipper PAUSE command
|
||||
SET_GCODE_OFFSET X=0 Y=0 ; this will insure that the head parks always at the same position in a multi setup
|
||||
G90 ; insure absolute move
|
||||
{% if "xyz" not in printer.toolhead.homed_axes %}
|
||||
{% if verbose %}{action_respond_info("Timelapse: Warning, axis not homed yet!")}{% endif %}
|
||||
{% else %}
|
||||
G0 {pos.x} {pos.y} {pos.z} F{speed.travel * 60}
|
||||
{% endif %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=takingframe VALUE=True
|
||||
UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_TAKE_FRAME DURATION={check_time}
|
||||
M400
|
||||
{% endif %}
|
||||
_TIMELAPSE_NEW_FRAME HYPERLAPSE={hyperlapse}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if verbose %}{action_respond_info("Timelapse: disabled, take frame ignored")}{% endif %}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro _TIMELAPSE_NEW_FRAME]
|
||||
description: action call for timelapse shoot. must be a seperate macro
|
||||
gcode:
|
||||
{action_call_remote_method("timelapse_newframe",
|
||||
macropark=printer['gcode_macro TIMELAPSE_TAKE_FRAME'].park,
|
||||
hyperlapse=params.HYPERLAPSE)}
|
||||
|
||||
[delayed_gcode _WAIT_TIMELAPSE_TAKE_FRAME]
|
||||
gcode:
|
||||
{% set tl = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %}
|
||||
{% set factor = {'speed': printer.gcode_move.speed_factor, 'extrude': printer.gcode_move.extrude_factor} %}
|
||||
{% if tl.takingframe %}
|
||||
UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_TAKE_FRAME DURATION={tl.check_time}
|
||||
{% else %}
|
||||
{tl.macro.resume} VELOCITY={tl.speed.travel} ; execute the klipper RESUME command
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=is_paused VALUE=False
|
||||
{% if not printer[printer.toolhead.extruder].can_extrude %}
|
||||
{action_respond_info("Timelapse: Warning minimum extruder temperature not reached!")}
|
||||
{% else %}
|
||||
{% if tl.extruder.fw_retract %}
|
||||
G11
|
||||
{% else %}
|
||||
G0 E{tl.extruder.extrude} F{tl.speed.extrude * 60}
|
||||
G0 F{tl.restore.speed}
|
||||
{% if tl.restore.absolute.extrude %}
|
||||
M82
|
||||
G92 E{tl.restore.e}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if tl.restore.factor.speed != factor.speed %} M220 S{(factor.speed*100)|round(0)} {% endif %}
|
||||
{% if tl.restore.factor.extrude != factor.extrude %} M221 S{(factor.extrude*100)|round(0)} {% endif %}
|
||||
{% if not tl.restore.absolute.coordinates %} G91 {% endif %}
|
||||
{% endif %}
|
||||
|
||||
####################################################################################################
|
||||
# #
|
||||
# HYPERLAPSE: Starts or stops a Hyperlapse video #
|
||||
# Usage: HYPERLAPSE ACTION=START [CYCLE=time] starts a hyperlapse with cycle time (default 30 sec) #
|
||||
# HYPERLAPSE ACTION=STOP stops the hyperlapse recording #
|
||||
# #
|
||||
####################################################################################################
|
||||
|
||||
######################### definition #########################
|
||||
## cycle: cycle time in seconds
|
||||
## run: internal use [True/False]
|
||||
###############################################################
|
||||
[gcode_macro HYPERLAPSE]
|
||||
description: Start/Stop a hyperlapse recording
|
||||
variable_cycle: 0
|
||||
variable_run: False
|
||||
gcode:
|
||||
{% set cycle = params.CYCLE|default(30)|int %}
|
||||
{% if params.ACTION and params.ACTION|lower == 'start' %}
|
||||
{action_respond_info("Hyperlapse: frames started (Cycle %d sec)" % cycle)}
|
||||
SET_GCODE_VARIABLE MACRO=HYPERLAPSE VARIABLE=run VALUE=True
|
||||
SET_GCODE_VARIABLE MACRO=HYPERLAPSE VARIABLE=cycle VALUE={cycle}
|
||||
UPDATE_DELAYED_GCODE ID=_HYPERLAPSE_LOOP DURATION={cycle}
|
||||
TIMELAPSE_TAKE_FRAME HYPERLAPSE=True
|
||||
{% elif params.ACTION and params.ACTION|lower == 'stop' %}
|
||||
{% if run %}{action_respond_info("Hyperlapse: frames stopped")}{% endif %}
|
||||
SET_GCODE_VARIABLE MACRO=HYPERLAPSE VARIABLE=run VALUE=False
|
||||
UPDATE_DELAYED_GCODE ID=_HYPERLAPSE_LOOP DURATION=0
|
||||
{% else %}
|
||||
{action_raise_error("Hyperlapse: No valid input parameter
|
||||
Use:
|
||||
- HYPERLAPSE ACTION=START [CYCLE=time]
|
||||
- HYPERLAPSE ACTION=STOP")}
|
||||
{% endif %}
|
||||
|
||||
[delayed_gcode _HYPERLAPSE_LOOP]
|
||||
gcode:
|
||||
UPDATE_DELAYED_GCODE ID=_HYPERLAPSE_LOOP DURATION={printer["gcode_macro HYPERLAPSE"].cycle}
|
||||
TIMELAPSE_TAKE_FRAME HYPERLAPSE=True
|
||||
|
||||
##########################################################################
|
||||
# #
|
||||
# TIMELAPSE_RENDER: Render the video at print end #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
######################### definition #########################
|
||||
## render: internal use. Valid inputs: [True, False]
|
||||
## run_identifier: internal use. Valid input [0 .. 3]
|
||||
###############################################################
|
||||
[gcode_macro TIMELAPSE_RENDER]
|
||||
description: Render Timelapse video and wait for the result
|
||||
variable_render: False
|
||||
variable_run_identifier: 0
|
||||
gcode:
|
||||
{action_respond_info("Timelapse: Rendering started")}
|
||||
{action_call_remote_method("timelapse_render", byrendermacro="True")}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_RENDER VARIABLE=render VALUE=True
|
||||
{printer.configfile.settings['gcode_macro pause'].rename_existing} ; execute the klipper PAUSE command
|
||||
UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_RENDER DURATION=0.5
|
||||
|
||||
[delayed_gcode _WAIT_TIMELAPSE_RENDER]
|
||||
gcode:
|
||||
{% set ri = printer['gcode_macro TIMELAPSE_RENDER'].run_identifier % 4 %}
|
||||
SET_GCODE_VARIABLE MACRO=TIMELAPSE_RENDER VARIABLE=run_identifier VALUE={ri + 1}
|
||||
{% if printer['gcode_macro TIMELAPSE_RENDER'].render %}
|
||||
M117 Rendering {['-','\\','|','/'][ri]}
|
||||
UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_RENDER DURATION=0.5
|
||||
{% else %}
|
||||
{action_respond_info("Timelapse: Rendering finished")}
|
||||
M117
|
||||
{printer.configfile.settings['gcode_macro resume'].rename_existing} ; execute the klipper RESUME command
|
||||
{% endif %}
|
||||
|
||||
##########################################################################
|
||||
# #
|
||||
# TEST_STREAM_DELAY: Helper macro to find stream and park delay #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
[gcode_macro TEST_STREAM_DELAY]
|
||||
description: Helper macro to find stream and park delay
|
||||
gcode:
|
||||
{% set min = printer.toolhead.axis_minimum %}
|
||||
{% set max = printer.toolhead.axis_maximum %}
|
||||
{% set act = printer.toolhead.position %}
|
||||
{% set tl = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %}
|
||||
{% if act.z > 5.0 %}
|
||||
G0 X{min.x + 5.0} F{tl.speed.travel|int * 60}
|
||||
G0 X{(max.x-min.x)/2}
|
||||
G4 P{tl.park.time|float * 1000}
|
||||
_TIMELAPSE_NEW_FRAME HYPERLAPSE=FALSE
|
||||
G0 X{max.x - 5.0}
|
||||
{% else %}
|
||||
{action_raise_error("Toolhead z %.3f to low. Please place head above z = 5.0" % act.z)}
|
||||
{% endif %}
|
3
02-klipper/01-configuration/variables.cfg
Normal file
3
02-klipper/01-configuration/variables.cfg
Normal file
@ -0,0 +1,3 @@
|
||||
[Variables]
|
||||
zoffset = {'z': '0'}
|
||||
|
Binary file not shown.
4
02-klipper/02-calibration/01-rotation-distance/README.md
Normal file
4
02-klipper/02-calibration/01-rotation-distance/README.md
Normal file
@ -0,0 +1,4 @@
|
||||
Extruder Calibration Aid by pkemp on Thingiverse: https://www.thingiverse.com/thing:2249786
|
||||
|
||||
Licensed under CC-BY
|
||||
https://creativecommons.org/licenses/by/4.0/
|
Binary file not shown.
Binary file not shown.
BIN
02-klipper/02-calibration/02-first-layer/First_Layer_Test.stl
Normal file
BIN
02-klipper/02-calibration/02-first-layer/First_Layer_Test.stl
Normal file
Binary file not shown.
Binary file not shown.
2
02-klipper/02-calibration/03-belt-tension/README.txt
Normal file
2
02-klipper/02-calibration/03-belt-tension/README.txt
Normal file
@ -0,0 +1,2 @@
|
||||
STL File by Dennis Gignac, no license.
|
||||
Source: https://drive.google.com/file/d/14GVGvWq80DfUpKCYH5ZWXYYB2dYxJtIR/view?usp=sharing
|
11622
02-klipper/02-calibration/04-enhanced-delta/calibrate_size.stl
Normal file
11622
02-klipper/02-calibration/04-enhanced-delta/calibrate_size.stl
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
02-klipper/03-timelapse/instructions.pdf
Normal file
BIN
02-klipper/03-timelapse/instructions.pdf
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user