Skip to content

Commit

Permalink
Merge branch 'master' into noncritical_mcus_pr
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerlz authored Oct 18, 2023
2 parents be9b5b1 + 72b9b99 commit b939ded
Show file tree
Hide file tree
Showing 54 changed files with 2,582 additions and 160 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-build_test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Perform continuous integration tests on updates and pull requests
name: Build test

on:
workflow_dispatch:
push:

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-static_analysis.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Perform continuous integration tests on pull requests
name: black

on: pull_request

jobs:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/klipper3d-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: klipper3d deploy
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- master
Expand All @@ -20,7 +18,7 @@ jobs:
with:
python-version: '3.8'

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/_klipper3d/mkdocs-requirements.txt') }}
Expand All @@ -34,7 +32,7 @@ jobs:
run: docs/_klipper3d/build-translations.sh

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.2.5
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: site # The folder the action should deploy.
4 changes: 2 additions & 2 deletions .github/workflows/upstream-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
# Fetch origin/prev_upstream
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: prev_upstream
path: "repo"
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Setup python
if: ${{ steps.fetch.outputs.new_commits }} == '1'
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.10.3
cache-dependency-path: scripts/requirements_dev.txt
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ klippy/.version
.DS_Store
ci_build/
ci_cache/
_test_.*
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<p align="center"><a href="https://DangerKlippers.github.io/danger-klipper/"><img align="center" src="docs/img/klipper-logo.png" alt="Danger-Klipper Logo"></a></p>

[![Action Status](https://github.com/DangerKlippers/danger-klipper/actions/workflows/ci-build_test.yaml/badge.svg?branch=master)](https://github.com/DangerKlippers/danger-klipper/actions/workflows/ci-build_test.yaml)

Welcome to the Danger Klipper project!

This is a community-maintained fork of the [Klipper](https://github.com/Klipper3d/klipper) firmware.
Expand All @@ -24,12 +28,17 @@ Features merged into the master branch:

- [probe: Drop the first result](https://github.com/DangerKlippers/danger-klipper/pull/2) ([klipper#3397](https://github.com/Klipper3d/klipper/issues/3397))

- [probe: z_calibration](https://github.com/DangerKlippers/danger-klipper/pull/31) ([klipper#4614](https://github.com/Klipper3d/klipper/pull/4614) / [protoloft/z_calibration](https://github.com/protoloft/klipper_z_calibration))

"Dangerous Klipper for dangerous users"
- [core: danger_options](https://github.com/DangerKlippers/danger-klipper/pull/67)

[![Klipper](docs/img/klipper-logo-small.png)](https://DangerKlippers.github.io/danger-klipper/)
- [stepper: home_current](https://github.com/DangerKlippers/danger-klipper/pull/65)

https://DangerKlippers.github.io/danger-klipper/
- [homing: post-home retract](https://github.com/DangerKlippers/danger-klipper/pull/65)

- [homing: sensorless minimum home distance](https://github.com/DangerKlippers/danger-klipper/pull/65)

"Dangerous Klipper for dangerous users"

Klipper is a 3d-Printer firmware. It combines the power of a general
purpose computer with one or more micro-controllers. See the
Expand Down
131 changes: 130 additions & 1 deletion docs/Config_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,31 @@ pins such as "extra_mcu:ar9" may then be used elsewhere in the config
[mcu my_extra_mcu]
# See the "mcu" section for configuration parameters.
```
## ⚠️ Danger Options
A collection of DangerKlipper-specific system options
```
[danger_options]
# If an unused config option or section should cause an error
# if False, will warn but allow klipper to still run
error_on_unused_config_options: True
# If statistics should be logged
# (helpful for keeping the log clean during development)
log_statistics: True
# If the config file should be logged at startup
log_config_file_at_startup: True
# If the bed mesh should be logged on startup
# (helpful for keeping the log clean during development)
log_bed_mesh_at_startup: True
# If we should log detailed crash info when an exception occurs
# Most of it is overly-verbose and fluff and we still get a stack trace
# for normal exceptions, so setting to False can help save time while developing
log_shutdown_info: True
```

## Common kinematic settings

Expand Down Expand Up @@ -179,7 +204,9 @@ position_max:
# is 5mm/s.
#homing_retract_dist: 5.0
# Distance to backoff (in mm) before homing a second time during
# homing. Set this to zero to disable the second home. The default
# homing. If `use_sensorless_homing` is false, this setting can be set
# to zero to disable the second home. If `use_sensorless_homing` is
# true, this setting can be > 0 to backoff after homing. The default
# is 5mm.
#homing_retract_speed:
# Speed to use on the retract move after homing in case this should
Expand All @@ -194,6 +221,9 @@ position_max:
# better to use the default than to specify this parameter. The
# default is true if position_endstop is near position_max and false
# if near position_min.
#use_sensorless_homing:
# If true, disables the second home action if homing_retract_dist > 0.
# The default is true if endstop_pin is configured to use virtual_endstop
```

### Cartesian Kinematics
Expand Down Expand Up @@ -2104,6 +2134,89 @@ calibrate_y: 112.5
# be near the center of the bed
```

### ⚠️ [z_calibration]

Automatic Z offset calibration. One may define this section if the printer
is able to calibrate the nozzle's offset automatically. See
[Z-Calibration guide](Z_Calibration.md) and
[command reference](G-Codes.md#automatic-z-offset-calibration) for further
information.

```
[z_calibration]
nozzle_xy_position:
# A X, Y coordinate (e.g. 100,100) of the nozzle, clicking on the Z endstop.
switch_xy_position:
# A X, Y coordinate (e.g. 100,100) of the probe's switch body, clicking on
# the Z endstop.
bed_xy_position: default from relative_reference_index of bed_mesh
# a X, Y coordinate (e.g. 100,100) where the print surface (e.g. the center
# point) is probed. These coordinates will be adapted by the
# probe's X and Y offsets. The default is the relative_reference_index
# of the configured bed_mesh, if configured. It's possible to change the relative
# reference index at runtime or use the GCode argument BED_POSITION of CALIBRATE_Z.
switch_offset:
# The trigger point offset of the used mag-probe switch.
# Larger values will position the nozzle closer to the bed.
# This needs to be find out manually. More on this later
# in this section..
max_deviation: 1.0
# The maximum allowed deviation of the calculated offset.
# If the offset exceeds this value, it will stop!
# The default is 1.0 mm.
samples: default from "probe:samples" section
# The number of times to probe each point. The probed z-values
# will be averaged. The default is from the probe's configuration.
samples_tolerance: default from "probe:samples_tolerance" section
# The maximum Z distance (in mm) that a sample may differ from other
# samples. The default is from the probe's configuration.
samples_tolerance_retries: default from "probe:samples_tolerance_retries" section
# The number of times to retry if a sample is found that exceeds
# samples_tolerance. The default is from the probe's configuration.
samples_result: default from "probe:samples_result" section
# The calculation method when sampling more than once - either
# "median" or "average". The default is from the probe's configuration.
clearance: 2 * z_offset from the "probe:z_offset" section
# The distance in mm to move up before moving to the next
# position. The default is two times the z_offset from the probe's
# configuration.
position_min: default from "stepper_z:position_min" section.
# Minimum valid distance (in mm) used for probing move. The
# default is from the Z rail configuration.
speed: 50
# The moving speed in X and Y. The default is 50 mm/s.
lift_speed: default from "probe:lift_speed" section
# Speed (in mm/s) of the Z axis when lifting the probe between
# samples and clearance moves. The default is from the probe's
# configuration.
probing_speed: default from "stepper_z:homing_speed" section.
# The fast probing speed (in mm/s) used, when probing_first_fast
# is activated. The default is from the Z rail configuration.
probing_second_speed: default from "stepper_z:second_homing_speed" section.
# The slower speed (in mm/s) for probing the recorded samples.
# The default is second_homing_speed of the Z rail configuration.
probing_retract_dist: default from "stepper_z:homing_retract_dist" section.
# Distance to retract (in mm) before probing the next sample.
# The default is homing_retract_dist from the Z rail configuration.
probing_first_fast: false
# If true, the first probing is done faster by the probing speed.
# This is to get faster down and the result is not recorded as a
# probing sample. The default is false.
start_gcode:
# A list of G-Code commands to execute prior to each calibration command.
# See docs/Command_Templates.md for G-Code format. This can be used to
# attach the probe.
before_switch_gcode:
# A list of G-Code commands to execute prior to each probing on the
# mag-probe. See docs/Command_Templates.md for G-Code format. This can be
# used to attach the probe after probing on the nozzle and before probing
# on the mag-probe.
end_gcode:
# A list of G-Code commands to execute after each calibration command.
# See docs/Command_Templates.md for G-Code format. This can be used to
# detach the probe afterwards.
```

## Additional stepper motors and extruders

### [stepper_z1]
Expand Down Expand Up @@ -3291,6 +3404,9 @@ run_current:
# when the stepper is not moving. Setting a hold_current is not
# recommended (see TMC_Drivers.md for details). The default is to
# not reduce the current.
#home_current:
# The amount of current (in amps RMS) to configure the driver to use
# during homing procedures. The default is to not reduce the current.
#sense_resistor: 0.110
# The resistance (in ohms) of the motor sense resistor. The default
# is 0.110 ohms.
Expand Down Expand Up @@ -3384,6 +3500,9 @@ run_current:
# when the stepper is not moving. Setting a hold_current is not
# recommended (see TMC_Drivers.md for details). The default is to
# not reduce the current.
#home_current:
# The amount of current (in amps RMS) to configure the driver to use
# during homing procedures. The default is to not reduce the current.
#sense_resistor: 0.110
# The resistance (in ohms) of the motor sense resistor. The default
# is 0.110 ohms.
Expand Down Expand Up @@ -3427,6 +3546,7 @@ uart_pin:
#interpolate: True
run_current:
#hold_current:
#home_current:
#sense_resistor: 0.110
#stealthchop_threshold: 0
# See the "tmc2208" section for the definition of these parameters.
Expand Down Expand Up @@ -3495,6 +3615,9 @@ cs_pin:
run_current:
# The amount of current (in amps RMS) used by the driver during
# stepper movement. This parameter must be provided.
#home_current:
# The amount of current (in amps RMS) to configure the driver to use
# during homing procedures. The default is to not reduce the current.
#sense_resistor:
# The resistance (in ohms) of the motor sense resistor. This
# parameter must be provided.
Expand Down Expand Up @@ -3572,6 +3695,9 @@ run_current:
# when the stepper is not moving. Setting a hold_current is not
# recommended (see TMC_Drivers.md for details). The default is to
# not reduce the current.
#home_current:
# The amount of current (in amps RMS) to configure the driver to use
# during homing procedures. The default is to not reduce the current.
#rref: 12000
# The resistance (in ohms) of the resistor between IREF and GND. The
# default is 12000.
Expand Down Expand Up @@ -3693,6 +3819,9 @@ run_current:
# when the stepper is not moving. Setting a hold_current is not
# recommended (see TMC_Drivers.md for details). The default is to
# not reduce the current.
#home_current:
# The amount of current (in amps RMS) to configure the driver to use
# during homing procedures. The default is to not reduce the current.
#sense_resistor: 0.075
# The resistance (in ohms) of the motor sense resistor. The default
# is 0.075 ohms.
Expand Down
34 changes: 27 additions & 7 deletions docs/G-Codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -916,12 +916,16 @@ in the config file.

#### PID_CALIBRATE
`PID_CALIBRATE HEATER=<config_name> TARGET=<temperature>
[WRITE_FILE=1]`: Perform a PID calibration test. The specified heater
will be enabled until the specified target temperature is reached, and
then the heater will be turned off and on for several cycles. If the
WRITE_FILE parameter is enabled, then the file /tmp/heattest.txt will
be created with a log of all temperature samples taken during the
test.
[WRITE_FILE=1] [TOLERANCE=0.02]`: Perform a PID calibration test. The
specified heater will be enabled until the specified target temperature
is reached, and then the heater will be turned off and on for several
cycles. If the WRITE_FILE parameter is enabled, then the file
/tmp/heattest.csv will be created with a log of all temperature samples
taken during the test. TOLERANCE defaults to 0.02 if not passed in. The
tighter the tolerance the better the calibration result will be, but how
tight you can achieve depends on how clean your sensor readings are. low
noise readings might allow 0.01, to be used, while noisy reading might
require a value of 0.03 or higher.

#### SET_HEATER_PID
`SET_HEATER_PID HEATER=<config_name> KP=<kp> KI=<ki> KD=<kd>`: Will
Expand Down Expand Up @@ -1212,7 +1216,7 @@ profile matching the supplied name from persistent memory. Note that
after SAVE or REMOVE operations have been run the SAVE_CONFIG gcode
must be run to make the changes to persistent memory permanent.

### [smart_effector]
### ⚠️ [smart_effector]

Several commands are available when a
[smart_effector config section](Config_Reference.md#smart_effector) is enabled.
Expand Down Expand Up @@ -1397,6 +1401,22 @@ the config. `REF_TEMP` manually overrides the reference temperature typically
set during homing (for use in e.g. non-standard homing routines) - will be reset
automatically upon homing.

### ⚠️ [z_calibration]

The following commands are available when a
[z_calibration config section](Config_Reference.md#z_calibration) is enabled
(also see the [Z-Calibration guide](Z_Calibration.md)):
- `CALIBRATE_Z`: This calibrates the current offset between the nozzle and
the print surface.
- `PROBE_Z_ACCURACY [PROBE_SPEED=<mm/s>] [LIFT_SPEED=<mm/s>] [SAMPLES=<count>]
[SAMPLE_RETRACT_DIST=<mm>]`: Calculate the maximum, minimum,
average, median, and standard deviation of multiple probe
samples. By default, 10 SAMPLES are taken. Otherwise the optional
parameters default to their equivalent setting in the z_calibration or probe
config section.
*Note* that appropriate macros and/or configurations are needed to attach
and detach a mag-probe for these commands!

### [z_tilt]

The following commands are available when the
Expand Down
Loading

0 comments on commit b939ded

Please sign in to comment.