Skip to content

Commit

Permalink
Merge branch 'v2.1.x' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Sep 28, 2024
2 parents 8af55ac + 4ea3236 commit 0c8db67
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 29 deletions.
3 changes: 2 additions & 1 deletion boards/btt-manta-m5p/board-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,6 @@
"mosi": "PB15",
"miso": "PB14"
}
}
},
"extruderlessConfig": "config-3z.cfg"
}
59 changes: 59 additions & 0 deletions boards/btt-manta-m5p/config-3z.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# WARNING. DO NOT EDIT THIS FILE.
# To override settings from this file, you can copy and paste the relevant
# sections into your printer.cfg and change it there.
# WARNING: it is NOT recommended to override board_pins aliases,
# use the boards pin names directly in your printer.cfg instead.
# Look up the pins you need in the boards pinout diagram.

[board_pins manta_m5p_tmc2209]
aliases:
# steppers
x_step_pin=PC8, x_dir_pin=PC9, x_enable_pin=PA15, x_uart_pin=PD9, x_diag_pin=PD3, x_endstop_pin=PD3,
y_step_pin=PA10, y_dir_pin=PA14, y_enable_pin=PA13, y_uart_pin=PD8, y_diag_pin=PD2, y_endstop_pin=PD2,
z0_step_pin=PC6, z0_dir_pin=PC7, z0_enable_pin=PA9, z0_uart_pin=PB10, z0_diag_pin=null,
z1_step_pin=PB12, z1_dir_pin=PB11, z1_enable_pin=PA8, z1_uart_pin=PB2, z1_diag_pin=null,
z2_step_pin=PB0, z2_dir_pin=PB1, z2_enable_pin=PC4, z2_uart_pin=PA6, z2_diag_pin=null,
stepper_spi_mosi_pin=PB15, stepper_spi_miso_pin=PB14, stepper_spi_sclk_pin=PB13,
# accel
adxl345_cs_pin=PC0,
# auto leveling
bltouch_sensor_pin=PC13, bltouch_control_pin=PC15,
probe_pin=PC13,
# fans
fan_part_cooling_pin=PA4,
fan_toolhead_cooling_pin=PA3,
fan_controller_board_pin=PA7,
# Bed heater
heater_bed_heating_pin=PA5,
heater_bed_sensor_pin=PA0,

## Expansion ports
# EXP1 header
EXP1_1=PD5, EXP1_2=PD4,
EXP1_3=PB3, EXP1_4=PD6,
EXP1_5=PB5, EXP1_6=PB4, # Slot in the socket on this side
EXP1_7=PB7, EXP1_8=PB6,
EXP1_9=<GND>, EXP1_10=<5V>,

# EXP2 header
EXP2_1=PB14, EXP2_2=PB13,
EXP2_3=PB8, EXP2_4=PB9,
EXP2_5=PC10, EXP2_6=PB15, # Slot in the socket on this side
EXP2_7=PC12, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=<NC>,

# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi2"

[mcu]
serial: /dev/btt-manta-m5p

[temperature_sensor Manta_M5P]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100

[adxl345]
spi_software_mosi_pin: stepper_spi_mosi_pin
spi_software_miso_pin: stepper_spi_miso_pin
spi_software_sclk_pin: stepper_spi_sclk_pin
cs_pin: adxl345_cs_pin
36 changes: 17 additions & 19 deletions macros/priming.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@
#####

[gcode_macro RatOS]
variable_nozzle_priming: "primeblob" # primeblob|false = To prime, or not to prime, that is the question.
variable_nozzle_prime_start_x: "max" # min|max|float = non IDEX priming x-location
variable_nozzle_prime_start_y: "min" # min|max|float = non IDEX priming y-location
variable_nozzle_prime_direction: "auto" # auto|forwards|backwards = non IDEX priming y-direction
variable_nozzle_prime_bridge_fan: 102 # int = priming fan speed 0-255
variable_probe_for_priming_result: None # internal use only. Do not touch!
variable_probe_for_priming_end_result: None # internal use only. Do not touch!
variable_probe_for_priming_result_t1: None # internal use only. Do not touch!
variable_probe_for_priming_end_result_t1: None # internal use only. Do not touch!
variable_adaptive_prime_offset_threshold: -1.0 # float = threshold value used for probing sanity checks
variable_last_z_offset: None # internal use only. Do not touch!
variable_nozzle_priming: "primeblob" # primeblob|false = To prime, or not to prime, that is the question.
variable_nozzle_prime_start_x: "max" # min|max|float = non IDEX priming x-location
variable_nozzle_prime_start_y: "min" # min|max|float = non IDEX priming y-location
variable_nozzle_prime_direction: "auto" # auto|forwards|backwards = non IDEX priming y-direction
variable_nozzle_prime_bridge_fan: 102 # int = priming fan speed 0-255
variable_probe_for_priming_result: None # internal use only. Do not touch!
variable_probe_for_priming_end_result: None # internal use only. Do not touch!
variable_probe_for_priming_result_t1: None # internal use only. Do not touch!
variable_probe_for_priming_end_result_t1: None # internal use only. Do not touch!
variable_probe_for_priming_disable_mesh_constraints: False # True|False - if True the probe location for the adaptive priming start and
# end points will not be constrained by the bed mesh min/max.
# WARNING: This can result in probing outside of the bed, be careful.
variable_adaptive_prime_offset_threshold: -1.0 # float = threshold value used for probing sanity checks
variable_last_z_offset: None # internal use only. Do not touch!


[gcode_macro SAVE_PROBE_RESULT]
Expand Down Expand Up @@ -115,13 +118,8 @@ gcode:
{% set y_offset = printer.configfile.settings.probe.y_offset|float %}
{% set z_offset = printer.configfile.settings.probe.z_offset|float %}
{% elif printer.configfile.settings.beacon is defined %}
{% if beacon_contact_prime_probing %}
{% set x_offset = 0 %}
{% set y_offset = 0 %}
{% else %}
{% set x_offset = printer.configfile.settings.beacon.x_offset|float %}
{% set y_offset = printer.configfile.settings.beacon.y_offset|float %}
{% endif %}
{% set x_offset = printer.configfile.settings.beacon.x_offset|float %}
{% set y_offset = printer.configfile.settings.beacon.y_offset|float %}
{% set z_offset = printer.configfile.settings.beacon.trigger_distance|float %}
{% else %}
{ action_raise_error("No probe, beacon or bltouch section found. Adaptive priming only works with a [probe], [beacon] or [bltouch] section defined.") }
Expand All @@ -131,7 +129,7 @@ gcode:
{ action_raise_error("Horizontal move Z ({z}) is below your probe's Z offset ({z_offset}). Please adjust your horizontal_move_z setting in [bed_mesh] to be above {z}.") }
{% endif %}

{% if not (printer.configfile.settings.beacon is defined and beacon_contact_prime_probing) %}
{% if probe_for_priming_disable_mesh_constraints|lower != 'true' %}
# get configured bed mesh area
{% set min_x = mesh_config.mesh_min.split(",")[0]|float - x_offset %}
{% set min_y = mesh_config.mesh_min.split(",")[1]|float - y_offset %}
Expand Down
51 changes: 47 additions & 4 deletions macros/unload_filament.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# sections into your printer.cfg and change it there.

[gcode_macro RatOS]
variable_runout_park_in: "front" # back|front|center = gantry parking position if a runout or clog has been detected
# variable_runout_park_x: 50 # float = if configured the x position of the toolhead. if not configured it will park in the middle
variable_runout_park_in: "front" # back|front|center = gantry parking position if a runout or clog has been detected
variable_enable_unload_tip_forming: False # true|false = enable filament tip forming during unloading
# variable_runout_park_x: 50 # float = if configured the x position of the toolhead. if not configured it will park in the middle

#####
# UNLOAD FILAMENT ENTRY POINTS
Expand Down Expand Up @@ -47,6 +48,36 @@ gcode:
{% endif %}
{% endif %}

#####
# Legacy unload filament macro
#####

[gcode_macro LEGACY_UNLOAD_FILAMENT]
description: Unloads the filament. Note: be careful with PETG, make sure you inspect the tip of your filament before reloading to avoid jams.
gcode:
{% set toolhead = params.TOOLHEAD|default(-1)|int %}
{% set unload_speed = 5 * 60 %}
{% set unload_length = printer["gcode_macro RatOS"].filament_unload_length|float %}
M117 Unloading filament...
# Extrude a bit
G0 E10 F300
# Extract filament to cold end area
G0 E-5 F3600
# Wait for three seconds
G4 P3000
# Push back the filament to smash any stringing
G0 E5 F6000
# Extract back fast in to the cold zone
G0 E-15 F6000
# Continue extraction slowly, allow the filament time to cool solid before it reaches the gears
G0 E-{unload_length} F{unload_speed}
_CLEANING_MOVE TOOLHEAD={toolhead}
M117 Filament unloaded!
RESPOND MSG="Filament unloaded! Please inspect the tip of the filament before reloading."

#####
# Tip forming
#####

[gcode_macro _DEFAULT_UNLOAD_FILAMENT]
description: Unload filament macro for non IDEX printers.
Expand All @@ -55,6 +86,7 @@ gcode:
{% set temp = params.TEMP|default(220)|int %}
{% set filament_name = params.NAME|default('')|string %}
{% set filament_type = params.TYPE|default('')|string %}
{% set is_tip_forming_enabled = printer["gcode_macro RatOS"].enable_unload_tip_forming|lower == 'true' %}

# config
{% set color_unknown = printer["gcode_macro RatOS"].status_color_unknown|string %}
Expand All @@ -79,7 +111,12 @@ gcode:
G4 P3000

# unload filament
_UNLOAD_FILAMENT TOOLHEAD=0 NAME='{filament_name}' TYPE='{filament_type}'

{% if is_tip_forming_enabled %}
_UNLOAD_FILAMENT TOOLHEAD=0 NAME='{filament_name}' TYPE='{filament_type}'
{% else %}
_LEGACY_UNLOAD_FILAMENT TOOLHEAD=0
{% endif %}

# restore gcode state
RESTORE_GCODE_STATE NAME=unload_state
Expand Down Expand Up @@ -107,6 +144,7 @@ gcode:
{% set toolhead = params.TOOLHEAD|int %}
{% set filament_name = params.NAME|default('')|string %}
{% set filament_type = params.TYPE|default('')|string %}
{% set is_tip_forming_enabled = printer["gcode_macro RatOS"].enable_unload_tip_forming|lower == 'true' %}

# config
{% set color_unknown = printer["gcode_macro RatOS"].status_color_unknown|string %}
Expand Down Expand Up @@ -141,7 +179,12 @@ gcode:
G4 P3000

# unload filament
_UNLOAD_FILAMENT TOOLHEAD={toolhead} NAME='{filament_name}' TYPE='{filament_type}'
{% if is_tip_forming_enabled %}
_UNLOAD_FILAMENT TOOLHEAD={toolhead} NAME='{filament_name}' TYPE='{filament_type}'
{% else %}
_LEGACY_UNLOAD_FILAMENT TEMP={temp} TOOLHEAD={toolhead}
{% endif %}


# set filament data
SAVE_VARIABLE VARIABLE=t{toolhead}_filament VALUE="('""', '""', 0)"
Expand Down
2 changes: 1 addition & 1 deletion printers/v-core-3-idex/printer-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"basic": {
"accel": 3000,
"velocity": 300,
"z_accel": 15,
"z_accel": 50,
"z_velocity": 30,
"travel_accel": 3000,
"travel_velocity": 300
Expand Down
2 changes: 1 addition & 1 deletion printers/v-core-3/printer-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"basic": {
"accel": 3000,
"velocity": 300,
"z_accel": 15,
"z_accel": 50,
"z_velocity": 30,
"travel_accel": 3000,
"travel_velocity": 300
Expand Down
2 changes: 1 addition & 1 deletion printers/v-core-4-hybrid/printer-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"basic": {
"accel": 3000,
"velocity": 300,
"z_accel": 15,
"z_accel": 50,
"z_velocity": 30,
"travel_accel": 3000,
"travel_velocity": 300
Expand Down
2 changes: 1 addition & 1 deletion printers/v-core-4-idex/printer-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"basic": {
"accel": 3000,
"velocity": 300,
"z_accel": 15,
"z_accel": 50,
"z_velocity": 30,
"travel_accel": 3000,
"travel_velocity": 300
Expand Down
2 changes: 1 addition & 1 deletion printers/v-core-4/printer-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"basic": {
"accel": 3000,
"velocity": 300,
"z_accel": 15,
"z_accel": 50,
"z_velocity": 30,
"travel_accel": 3000,
"travel_velocity": 300
Expand Down

0 comments on commit 0c8db67

Please sign in to comment.