Skip to content

Commit

Permalink
readme and tests for z_calibration (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerlz authored Sep 14, 2023
1 parent f2f752d commit f1e9db7
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 6 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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ 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"

Expand Down
100 changes: 100 additions & 0 deletions test/klippy/z_calibration.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Test config for z_tilt and quad_gantry_level
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PE5
position_endstop: 0
position_max: 250
homing_speed: 50

[stepper_y]
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^PJ1
position_endstop: 0
position_max: 250
homing_speed: 50

[stepper_z]
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: ^PD3
position_endstop: 0.5
position_max: 250

[stepper_z1]
step_pin: PC1
dir_pin: PC3
enable_pin: !PC7
microsteps: 16
rotation_distance: 8
endstop_pin: ^PD2

[stepper_z2]
step_pin: PH1
dir_pin: PH0
enable_pin: !PA1
microsteps: 16
rotation_distance: 8

[stepper_z3]
step_pin: PE3
dir_pin: PG5
microsteps: 16
rotation_distance: 8

[extruder]
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.5
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK5
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250

[heater_bed]
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK6
control: watermark
min_temp: 0
max_temp: 130

[probe]
pin: PH6
z_offset: 0

[mcu]
serial: /dev/ttyACM0

[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100

[z_calibration]
nozzle_xy_position: 100,100
switch_xy_position: 101, 101
bed_xy_position: 150, 150
switch_offset: 0.5
max_deviation: 3.0
12 changes: 12 additions & 0 deletions test/klippy/z_calibration.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Test case for z_calibration
CONFIG z_calibration.cfg
DICTIONARY atmega2560.dict

# Start by homing the printer.
G28
G1 Z5 X10 Y10 F6000
M400
GET_POSITION

# Test CALIBRATE_Z
CALIBRATE_Z

0 comments on commit f1e9db7

Please sign in to comment.