feat(config): add a certain config modularity (#8)

Co-authored-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
th33xitus 2022-06-17 20:22:28 +02:00 committed by GitHub
parent 8049e10089
commit 56e6c0169d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 305 additions and 168 deletions

View File

@ -0,0 +1,47 @@
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[stepper_x]
step_pin: PD7
dir_pin: !PC5
enable_pin: !PD6
endstop_pin: ^PC2
microsteps: 16
rotation_distance: 40
position_endstop: 0
position_max: 235
position_min: -15
homing_speed: 50
homing_retract_dist: 0
[stepper_y]
step_pin: PC6
dir_pin: !PC7
enable_pin: !PD6
endstop_pin: ^PC3
microsteps: 16
rotation_distance: 40
position_endstop: 0
position_max: 235
position_min: -15
homing_speed: 50
homing_retract_dist: 0
[stepper_z]
step_pin: PB3
dir_pin: PB2
enable_pin: !PA5
endstop_pin: ^PC4
microsteps: 16
rotation_distance: 8
position_endstop: 0.0
position_max: 250
position_min: -2
homing_retract_dist: 0

View File

@ -0,0 +1,9 @@
[gcode_macro M104]
rename_existing: M104.1
gcode:
M117 M104 called with {rawparams}
[gcode_macro M109]
rename_existing: M109.1
gcode:
M117 M109 called with {rawparams}

View File

@ -0,0 +1,48 @@
############################################
### BASIC SET OF MACROS ###
############################################
[gcode_macro START_PRINT]
gcode:
M117 START_PRINT called with {rawparams}
G28
[gcode_macro END_PRINT]
gcode:
M117 END_PRINT called with {rawparams}
[gcode_macro CANCEL_PRINT]
rename_existing: CANCEL_PRINT_BASE
gcode:
M117 CANCEL_PRINT called with {rawparams}
CANCEL_PRINT_BASE
[gcode_macro PAUSE]
rename_existing: PAUSE_BASE
gcode:
M117 PAUSE called with {rawparams}
PAUSE_BASE
[gcode_macro RESUME]
rename_existing: RESUME_BASE
gcode:
M117 RESUME called with {rawparams}
RESUME_BASE
[gcode_macro M117]
rename_existing: M117.1
gcode:
M117.1 {rawparams}
{action_respond_info(rawparams)}
[gcode_macro M600]
gcode:
M117 M600 called with {rawparams}
PAUSE
[gcode_macro LOAD_FILAMENT]
gcode:
M117 Loading Filament! Please wait...
[gcode_macro UNLOAD_FILAMENT]
gcode:
M117 Unloading Filament! Please wait...

View File

@ -0,0 +1,55 @@
[include basic_extruder.cfg]
[extruder]
step_pin: PB1
dir_pin: !PB0
enable_pin: !PD6
heater_pin: PD5
sensor_pin: PA7
sensor_type: EPCOS 100K B57560G104F
control: watermark
microsteps: 16
rotation_distance: 33.683
nozzle_diameter: 0.400
filament_diameter: 1.750
min_temp: 0
max_temp: 250
min_extrude_temp: 50
max_extrude_only_distance: 50.0
pressure_advance: 0.1
pressure_advance_smooth_time: 0.01
[extruder1]
step_pin: PD3
dir_pin: PD2
enable_pin: !PD6
heater_pin: PB7
sensor_pin: PA1
sensor_type: EPCOS 100K B57560G104F
control: watermark
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.500
filament_diameter: 1.75
min_temp: 0
max_temp: 250
min_extrude_temp: 210
max_extrude_only_distance: 100.0
pressure_advance: 0.2
pressure_advance_smooth_time: 0.02
[gcode_macro T0]
variable_active: 1
gcode:
{ action_respond_info("Switching to T0") }
SET_GCODE_VARIABLE MACRO=T0 VARIABLE=active VALUE=1
SET_GCODE_VARIABLE MACRO=T1 VARIABLE=active VALUE=0
ACTIVATE_EXTRUDER EXTRUDER=extruder
[gcode_macro T1]
variable_active: 0
gcode:
{ action_respond_info("Switching to T1") }
SET_GCODE_VARIABLE MACRO=T0 VARIABLE=active VALUE=0
SET_GCODE_VARIABLE MACRO=T1 VARIABLE=active VALUE=1
ACTIVATE_EXTRUDER EXTRUDER=extruder1

View File

@ -0,0 +1,47 @@
[include basic_extruder.cfg]
[extruder]
heater_pin: PD5
sensor_pin: PA7
sensor_type: EPCOS 100K B57560G104F
control: watermark
nozzle_diameter: 0.400
filament_diameter: 1.750
min_temp: 0
max_temp: 250
min_extrude_temp: 50
max_extrude_only_distance: 50.0
[extruder_stepper stepper1]
extruder: extruder
step_pin: PB1
dir_pin: !PB0
enable_pin: !PD6
microsteps: 16
rotation_distance: 33.500
[extruder_stepper stepper2]
extruder: extruder
step_pin: PD3
dir_pin: PD2
enable_pin: !PD6
microsteps: 16
rotation_distance: 33.500
[gcode_macro T0]
variable_active: 1
gcode:
{ action_respond_info("Switching to T0") }
SET_GCODE_VARIABLE MACRO=T0 VARIABLE=active VALUE=1
SET_GCODE_VARIABLE MACRO=T1 VARIABLE=active VALUE=0
SYNC_EXTRUDER_MOTION EXTRUDER=stepper2 MOTION_QUEUE=
SYNC_EXTRUDER_MOTION EXTRUDER=stepper1 MOTION_QUEUE=extruder
[gcode_macro T1]
variable_active: 0
gcode:
{ action_respond_info("Switching to T1") }
SET_GCODE_VARIABLE MACRO=T0 VARIABLE=active VALUE=0
SET_GCODE_VARIABLE MACRO=T1 VARIABLE=active VALUE=1
SYNC_EXTRUDER_MOTION EXTRUDER=stepper1 MOTION_QUEUE=
SYNC_EXTRUDER_MOTION EXTRUDER=stepper2 MOTION_QUEUE=extruder

View File

@ -0,0 +1,17 @@
[heater_bed]
heater_pin: PD4
sensor_pin: PA6
sensor_type: EPCOS 100K B57560G104F
control: watermark
min_temp: 0
max_temp: 130
[gcode_macro M140]
rename_existing: M140.1
gcode:
M117 M140 called with {rawparams}
[gcode_macro M190]
rename_existing: M190.1
gcode:
M117 M190 called with {rawparams}

View File

@ -0,0 +1,20 @@
[include basic_extruder.cfg]
[extruder]
step_pin: PB1
dir_pin: !PB0
enable_pin: !PD6
heater_pin: PD5
sensor_pin: PA7
sensor_type: EPCOS 100K B57560G104F
control: watermark
microsteps: 16
rotation_distance: 33.683
nozzle_diameter: 0.400
filament_diameter: 1.750
min_temp: 0
max_temp: 250
min_extrude_temp: 50
max_extrude_only_distance: 50.0
pressure_advance: 0.1
pressure_advance_smooth_time: 0.01

View File

@ -0,0 +1,29 @@
[temperature_sensor endstop]
sensor_type: Generic 3950
sensor_pin: PA1
min_temp: -255
max_temp: 256
gcode_id: E
[temperature_fan chamber_heater]
pin: PD2
max_power: 1.0
shutdown_speed: 0.0
cycle_time: 0.0005 #2 kHz PWM signal
hardware_pwm: False
kick_start_time: 0
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA6
min_temp: -255
max_temp: 256
target_temp: 0
max_speed: 0.7
min_speed: 0.1
control: pid
pid_Kp: 2.0 ;40
pid_Ki: 5.0 ;0.2
pid_Kd: 0.5 ;0.1
pid_deriv_time: 2.0
gcode_id: C
tachometer_pin: PD3
tachometer_ppr: 2

View File

@ -10,11 +10,18 @@ enable_debug_logging: False
[database]
database_path: ~/.moonraker_database
[data_store]
temperature_store_size: 1200
gcode_store_size: 1000
[file_manager]
log_path: ~/klipper_logs
config_path: ~/klipper_config
enable_object_processing: True
[authorization]
force_logins: False
default_source: moonraker
trusted_clients:
0.0.0.0/0
cors_domains:
@ -22,6 +29,17 @@ cors_domains:
[history]
[job_queue]
load_on_startup: False
automatic_transition: False
[octoprint_compat]
[announcements]
dev_mode: False
subscriptions:
mainsail
[update_manager]
enable_repo_debug: True
refresh_interval: 24

View File

@ -15,41 +15,18 @@
############################################
### DO NOT CHANGE PIN ASSIGNMENTS !!! ###
############################################
[stepper_x]
step_pin: PD7
dir_pin: !PC5
enable_pin: !PD6
endstop_pin: ^PC2
# Basic configurations (safe / required to use)
[include addons/basic_cartesian_kinematics.cfg]
[include addons/basic_macros.cfg]
[stepper_y]
step_pin: PC6
dir_pin: !PC7
enable_pin: !PD6
endstop_pin: ^PC3
# Extruder configuration (only one config allowed at a time)
[include addons/single_extruder.cfg]
#[include addons/dual_extruder.cfg]
#[include addons/dual_extruder_stepper.cfg]
[stepper_z]
step_pin: PB3
dir_pin: PB2
enable_pin: !PA5
endstop_pin: ^PC4
[extruder]
step_pin: PB1
dir_pin: !PB0
enable_pin: !PD6
heater_pin: PD5
sensor_pin: PA7
[extruder1]
step_pin: PD3
dir_pin: PD2
enable_pin: !PD6
heater_pin: PB7
sensor_pin: PA1
[heater_bed]
heater_pin: PD4
sensor_pin: PA6
# Other temperature sensors (only one config allowed at a time)
[include addons/heater_bed.cfg]
#[include addons/temp_sensors.cfg]
############################################
### ADDITIONAL CONFIGURATIONS ###
@ -62,13 +39,6 @@ sensor_pin: PA6
serial: /tmp/pseudoserial
restart_method: arduino
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[virtual_sdcard]
path: ~/gcode_files
@ -77,68 +47,12 @@ retract_length: 0.5
retract_speed: 75
unretract_speed: 75
[stepper_x]
microsteps: 16
rotation_distance: 40
position_endstop: 0
position_max: 235
homing_speed: 50
homing_retract_dist: 0
[stepper_y]
microsteps: 16
rotation_distance: 40
position_endstop: 0
position_max: 235
homing_speed: 50
homing_retract_dist: 0
[stepper_z]
microsteps: 16
rotation_distance: 8
position_endstop: 0.0
position_max: 250
homing_retract_dist: 0
[extruder]
sensor_type: EPCOS 100K B57560G104F
control: watermark
microsteps: 16
rotation_distance: 33.683
nozzle_diameter: 0.400
filament_diameter: 1.750
min_temp: 0
max_temp: 250
min_extrude_temp: 50
max_extrude_only_distance: 100.0
pressure_advance: 0.1
pressure_advance_smooth_time: 0.01
[extruder1]
sensor_type: EPCOS 100K B57560G104F
control: watermark
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.500
filament_diameter: 1.75
min_temp: 0
max_temp: 250
min_extrude_temp: 50
max_extrude_only_distance: 100.0
pressure_advance: 0.2
pressure_advance_smooth_time: 0.02
[heater_bed]
sensor_type: EPCOS 100K B57560G104F
control: watermark
min_temp: 0
max_temp: 130
############################################
### MISCELLANEOUS ###
############################################
[fan]
pin: PB4
off_below: 0.2
[heater_fan heater_fan]
pin: PB5
@ -178,72 +92,6 @@ mesh_min: 10, 10
mesh_max: 225, 225
probe_count: 5, 5
############################################
### MACROS ###
############################################
[gcode_macro START_PRINT]
gcode:
M117 START_PRINT called with {rawparams}
G28
[gcode_macro END_PRINT]
gcode:
M117 END_PRINT called with {rawparams}
[gcode_macro CANCEL_PRINT]
rename_existing: CANCEL_PRINT_BASE
gcode:
M117 CANCEL_PRINT called with {rawparams}
CANCEL_PRINT_BASE
[gcode_macro PAUSE]
rename_existing: PAUSE_BASE
gcode:
M117 PAUSE called with {rawparams}
PAUSE_BASE
[gcode_macro RESUME]
rename_existing: RESUME_BASE
gcode:
M117 RESUME called with {rawparams}
RESUME_BASE
[gcode_macro M117]
rename_existing: M117.1
gcode:
M117.1 {rawparams}
{action_respond_info(rawparams)}
[gcode_macro M104]
rename_existing: M104.1
gcode:
M117 M104 called with {rawparams}
[gcode_macro M109]
rename_existing: M109.1
gcode:
M117 M109 called with {rawparams}
[gcode_macro M140]
rename_existing: M140.1
gcode:
M117 M140 called with {rawparams}
[gcode_macro M190]
rename_existing: M190.1
gcode:
M117 M190 called with {rawparams}
[gcode_macro T0]
gcode:
M117 Switching to T0 / extruder
ACTIVATE_EXTRUDER EXTRUDER=extruder
[gcode_macro T1]
gcode:
M117 Switching to T1 / extruder1
ACTIVATE_EXTRUDER EXTRUDER=extruder1
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#

View File

@ -2,15 +2,14 @@
[ ! -e /bin/systemctl ] && sudo -S ln -s /bin/true /bin/systemctl
cd ~ || exit 1
[ ! -d ~/klipper_config ] && mkdir klipper_config
[ ! -d ~/klipper_logs ] && mkdir klipper_logs
[ ! -d ~/gcode_files ] && mkdir gcode_files
[ ! -d ~/.moonraker_database ] && mkdir .moonraker_database
[ ! -f ~/klipper_config/printer.cfg ] && \
cp ~/example-configs/printer.cfg ~/klipper_config/printer.cfg
[ ! -f ~/klipper_config/moonraker.conf ] && \
cp ~/example-configs/moonraker.conf ~/klipper_config/moonraker.conf
if [ ! -d ~/klipper_config ] || find ~/klipper_config -type d -empty; then
cd ~/example-configs || exit 1
cp -r ./* ~/klipper_config
fi
sudo chown -R printer:printer ~/klipper_config
sudo chown -R printer:printer ~/klipper_logs