Skip to content

Commit

Permalink
Merge branch 'Klipper3d:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dianlight authored Mar 8, 2024
2 parents 85810f9 + 31de734 commit 758a6f6
Show file tree
Hide file tree
Showing 43 changed files with 774 additions and 348 deletions.
6 changes: 3 additions & 3 deletions config/generic-mini-rambo.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,23 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.3
value: 1.3

[output_pin stepper_z_current]
pin: PL4
pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.3
value: 1.3

[output_pin stepper_e_current]
pin: PL5
pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.25
value: 1.25

[static_digital_output stepper_config]
pins:
Expand Down
8 changes: 4 additions & 4 deletions config/generic-ultimaker-ultimainboard-v2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ max_z_accel: 30

[output_pin case_light]
pin: PH5
static_value: 1.0
value: 1.0

# Motor current settings.
[output_pin stepper_xy_current]
Expand All @@ -107,7 +107,7 @@ scale: 2.000
# Max power setting.
cycle_time: .000030
hardware_pwm: True
static_value: 1.200
value: 1.200
# Power adjustment setting.

[output_pin stepper_z_current]
Expand All @@ -116,12 +116,12 @@ pwm: True
scale: 2.000
cycle_time: .000030
hardware_pwm: True
static_value: 1.200
value: 1.200

[output_pin stepper_e_current]
pin: PL3
pwm: True
scale: 2.000
cycle_time: .000030
hardware_pwm: True
static_value: 1.250
value: 1.250
6 changes: 3 additions & 3 deletions config/printer-adimlab-2018.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,23 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.3
value: 1.3

[output_pin stepper_z_current]
pin: PL4
pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.3
value: 1.3

[output_pin stepper_e_current]
pin: PL3
pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.25
value: 1.25

[display]
lcd_type: st7920
Expand Down
4 changes: 2 additions & 2 deletions config/printer-anycubic-kobra-plus-2022.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# To build the firmware, use the following configuration:
# - Micro-controller: Huada Semiconductor HC32F460
# - Communication interface: Serial (PA3 & PA2) - Anycube
# - Clock Speed: 200 MHz
#
# Installation:
# 1. Rename the klipper bin to `firmware.bin` and copy it to an SD Card.
Expand Down Expand Up @@ -144,10 +145,9 @@ max_temp: 120
pause_on_runout: True
switch_pin: !PC13

[heater_fan controller_fan]
[controller_fan controller_fan]
pin: PA14
heater: heater_bed
heater_temp: 45.0

[heater_fan hotend_fan]
pin: PA13
Expand Down
1 change: 0 additions & 1 deletion config/printer-creality-cr30-2021.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ max_temp: 100

[output_pin led]
pin: PC14
static_value: 0

# Neopixel LED support
# [neopixel led_neopixel]
Expand Down
12 changes: 4 additions & 8 deletions config/printer-geeetech-301-2019.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,21 @@ pid_Kp: 39
pid_Ki: 2
pid_Kd: 210

[extruder1]
[extruder_stepper e1]
extruder:
step_pin: PA0
dir_pin: !PB6
enable_pin: !PA1
microsteps: 16
rotation_distance: 32
nozzle_diameter: 0.4
filament_diameter: 1.75
shared_heater: extruder

[extruder2]
[extruder_stepper e2]
extruder:
step_pin: PB2
dir_pin: !PB11
enable_pin: !PC4
microsteps: 16
rotation_distance: 32
nozzle_diameter: 0.4
filament_diameter: 1.75
shared_heater: extruder

[heater_bed]
heater_pin: PB1
Expand Down
6 changes: 3 additions & 3 deletions config/printer-lulzbot-mini1-2016.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,23 @@ pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.300
value: 1.300

[output_pin stepper_z_current]
pin: PL4
pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.630
value: 1.630

[output_pin stepper_e_current]
pin: PL5
pwm: True
scale: 2.0
cycle_time: .000030
hardware_pwm: True
static_value: 1.250
value: 1.250

[static_digital_output stepper_config]
# Microstepping pins
Expand Down
1 change: 0 additions & 1 deletion config/printer-modix-big60-2020.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ algorithm: bicubic
bicubic_tension: 0.15
fade_start: 0.5
fade_end: 2.5
relative_reference_index: 60

[bed_screws]
screw1: 0,0
Expand Down
6 changes: 3 additions & 3 deletions config/printer-wanhao-duplicator-6-2016.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,23 @@ pwm: True
scale: 2.782
cycle_time: .000030
hardware_pwm: True
static_value: 1.2
value: 1.2

[output_pin stepper_z_current]
pin: PL4
pwm: True
scale: 2.782
cycle_time: .000030
hardware_pwm: True
static_value: 1.2
value: 1.2

[output_pin stepper_e_current]
pin: PL3
pwm: True
scale: 2.782
cycle_time: .000030
hardware_pwm: True
static_value: 1.0
value: 1.0

[display]
lcd_type: ssd1306
Expand Down
4 changes: 1 addition & 3 deletions config/sample-macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ gcode:
# P is the tone duration, S the tone frequency.
# The frequency won't be pitch perfect.

[output_pin BEEPER_pin]
[pwm_cycle_time BEEPER_pin]
pin: ar37
# Beeper pin. This parameter must be provided.
# ar37 is the default RAMPS/MKS pin.
pwm: True
# A piezo beeper needs a PWM signal, a DC buzzer doesn't.
value: 0
# Silent at power on, set to 1 if active low.
shutdown_value: 0
Expand Down
74 changes: 69 additions & 5 deletions docs/Bed_Mesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,68 @@ are identified in green.

![bedmesh_interpolated](img/bedmesh_faulty_regions.svg)

### Adaptive Meshes

Adaptive bed meshing is a way to speed up the bed mesh generation by only probing
the area of the bed used by the objects being printed. When used, the method will
automatically adjust the mesh parameters based on the area occupied by the defined
print objects.

The adapted mesh area will be computed from the area defined by the boundaries of all
the defined print objects so it covers every object, including any margins defined in
the configuration. After the area is computed, the number of probe points will be
scaled down based on the ratio of the default mesh area and the adapted mesh area. To
illustrate this consider the following example:

For a 150mmx150mm bed with `mesh_min` set to `25,25` and `mesh_max` set to `125,125`,
the default mesh area is a 100mmx100mm square. An adapted mesh area of `50,50`
means a ratio of `0.5x0.5` between the adapted area and default mesh area.

If the `bed_mesh` configuration specified `probe_count` as `7x7`, the adapted bed
mesh will use 4x4 probe points (7 * 0.5 rounded up).

![adaptive_bedmesh](img/adaptive_bed_mesh.svg)

```
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 35, 6
mesh_max: 240, 198
probe_count: 5, 3
adaptive_margin: 5
```

- `adaptive_margin` \
_Default Value: 0_ \
Margin (in mm) to add around the area of the bed used by the defined objects. The diagram
below shows the adapted bed mesh area with an `adaptive_margin` of 5mm. The adapted mesh
area (area in green) is computed as the used bed area (area in blue) plus the defined margin.

![adaptive_bedmesh_margin](img/adaptive_bed_mesh_margin.svg)

By nature, adaptive bed meshes use the objects defined by the Gcode file being printed.
Therefore, it is expected that each Gcode file will generate a mesh that probes a different
area of the print bed. Therefore, adapted bed meshes should not be re-used. The expectation
is that a new mesh will be generated for each print if adaptive meshing is used.

It is also important to consider that adaptive bed meshing is best used on machines that can
normally probe the entire bed and achieve a maximum variance less than or equal to 1 layer
height. Machines with mechanical issues that a full bed mesh normally compensates for may
have undesirable results when attempting print moves **outside** of the probed area. If a
full bed mesh has a variance greater than 1 layer height, caution must be taken when using
adaptive bed meshes and attempting print moves outside of the meshed area.

## Bed Mesh Gcodes

### Calibration

`BED_MESH_CALIBRATE PROFILE=<name> METHOD=[manual | automatic] [<probe_parameter>=<value>]
[<mesh_parameter>=<value>]`\
[<mesh_parameter>=<value>] [ADAPTIVE=[0|1] [ADAPTIVE_MARGIN=<value>]`\
_Default Profile: default_\
_Default Method: automatic if a probe is detected, otherwise manual_
_Default Method: automatic if a probe is detected, otherwise manual_ \
_Default Adaptive: 0_ \
_Default Adaptive Margin: 0_

Initiates the probing procedure for Bed Mesh Calibration.

Expand All @@ -399,6 +453,8 @@ following parameters are available:
- `ROUND_PROBE_COUNT`
- All beds:
- `ALGORITHM`
- `ADAPTIVE`
- `ADAPTIVE_MARGIN`

See the configuration documentation above for details on how each parameter
applies to the mesh.
Expand Down Expand Up @@ -486,11 +542,19 @@ This gcode may be used to clear the internal mesh state.

### Apply X/Y offsets

`BED_MESH_OFFSET [X=<value>] [Y=<value>]`
`BED_MESH_OFFSET [X=<value>] [Y=<value>] [ZFADE=<value>]`

This is useful for printers with multiple independent extruders, as an offset
is necessary to produce correct Z adjustment after a tool change. Offsets
should be specified relative to the primary extruder. That is, a positive
X offset should be specified if the secondary extruder is mounted to the
right of the primary extruder, and a positive Y offset should be specified
if the secondary extruder is mounted "behind" the primary extruder.
right of the primary extruder, a positive Y offset should be specified
if the secondary extruder is mounted "behind" the primary extruder, and
a positive ZFADE offset should be specified if the secondary extruder's
nozzle is above the primary extruder's.

Note that a ZFADE offset does *NOT* directly apply additional adjustment. It
is intended to compensate for a `gcode offset` when [mesh fade](#mesh-fade)
is enabled. For example, if a secondary extruder is higher than the primary
and needs a negative gcode offset, ie: `SET_GCODE_OFFSET Z=-.2`, it can be
accounted for in `bed_mesh` with `BED_MESH_OFFSET ZFADE=.2`.
21 changes: 21 additions & 0 deletions docs/Config_Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ All dates in this document are approximate.

## Changes

20240215: Several deprecated features have been removed. Using "NTC
100K beta 3950" as a thermistor name has been removed (deprecated on
20211110). The `SYNC_STEPPER_TO_EXTRUDER` and
`SET_EXTRUDER_STEP_DISTANCE` commands have been removed, and the
extruder `shared_heater` config option has been removed (deprecated on
20220210). The bed_mesh `relative_reference_index` option has been
removed (deprecated on 20230619).

20240123: The output_pin SET_PIN CYCLE_TIME parameter has been
removed. Use the new
[pwm_cycle_time](Config_Reference.md#pwm_cycle_time) module if it is
necessary to dynamically change a pwm pin's cycle time.

20240123: The output_pin `maximum_mcu_duration` parameter is
deprecated. Use a [pwm_tool config section](Config_Reference.md#pwm_tool)
instead. The option will be removed in the near future.

20240123: The output_pin `static_value` parameter is deprecated.
Replace with `value` and `shutdown_value` parameters. The option will
be removed in the near future.

20231216: The `[hall_filament_width_sensor]` is changed to trigger filament runout
when the thickness of the filament exceeds `max_diameter`. The maximum diameter
defaults to `default_nominal_filament_diameter + max_difference`. See
Expand Down
Loading

0 comments on commit 758a6f6

Please sign in to comment.