Skip to content

Commit

Permalink
tests for danger features (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerlz authored Sep 14, 2023
1 parent f1e9db7 commit 8759a30
Show file tree
Hide file tree
Showing 13 changed files with 568 additions and 4 deletions.
8 changes: 4 additions & 4 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 Down Expand Up @@ -28,10 +32,6 @@ Features merged into the master branch:

"Dangerous Klipper for dangerous users"

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

https://DangerKlippers.github.io/danger-klipper/

Klipper is a 3d-Printer firmware. It combines the power of a general
purpose computer with one or more micro-controllers. See the
[features document](https://DangerKlippers.github.io/danger-klipper/Features.html) for more
Expand Down
80 changes: 80 additions & 0 deletions test/klippy/dockable_probe.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Test config for probe:z_virtual_endstop
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
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: 200
homing_speed: 50

[stepper_z]
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
endstop_pin: ^PJ2
position_endstop: 0
rotation_distance: 8
position_max: 200

[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

[bed_mesh]
mesh_min: 10,10
mesh_max: 180,180

[mcu]
serial: /dev/ttyACM0

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

[dockable_probe]
dock_position: 100, 100
approach_position: 150, 150
detach_position: 120, 120
pin: PH6
z_offset: 1.15
check_open_attach: false
30 changes: 30 additions & 0 deletions test/klippy/dockable_probe.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Test case for dockable_probe support
CONFIG dockable_probe.cfg
DICTIONARY atmega2560.dict

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

# Z / X / Y moves
#G1 Z1
#G1 X1
#G1 Y1

# Move again
#G1 Z5 X0 Y0

# Test multiple dockable_probe commands without attaching the probe
MOVE_TO_APPROACH_PROBE
MOVE_TO_DOCK_PROBE
MOVE_TO_EXTRACT_PROBE
MOVE_TO_INSERT_PROBE
MOVE_TO_DETACH_PROBE

# Query the probe status
QUERY_DOCKABLE_PROBE

# Move again
G1 Z9
65 changes: 65 additions & 0 deletions test/klippy/fan_pwm_scaling.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Config for extruder testing
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
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: 200
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: 200

[extruder]
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.5
nozzle_diameter: 0.500
filament_diameter: 3.500
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: 210

[fan]
pin: PB5
min_power: 0.1
max_power: 1

[mcu]
serial: /dev/ttyACM0

[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
16 changes: 16 additions & 0 deletions test/klippy/fan_pwm_scaling.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Pid hot modify tests
DICTIONARY atmega2560.dict
CONFIG fan_pwm_scaling.cfg

# Extrude only
G1 E5
G1 E-2
G1 E7

# Home and extrusion moves
G28
G1 X20 Y20 Z1
G1 X25 Y25 E7.5

# Turn on the fan
M106 S255
72 changes: 72 additions & 0 deletions test/klippy/fan_reverse.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Config for extruder testing
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
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: 200
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: 200

[extruder]
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 33.5
nozzle_diameter: 0.500
filament_diameter: 3.500
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: 210

[temperature_fan my_temp_fan]
pin: PB5
reverse: true
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK6
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 210

[mcu]
serial: /dev/ttyACM0

[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
13 changes: 13 additions & 0 deletions test/klippy/fan_reverse.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Pid hot modify tests
DICTIONARY atmega2560.dict
CONFIG fan_reverse.cfg

# Extrude only
G1 E5
G1 E-2
G1 E7

# Home and extrusion moves
G28
G1 X20 Y20 Z1
G1 X25 Y25 E7.5
80 changes: 80 additions & 0 deletions test/klippy/gcode_jinja2_ext_do.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Test config for probe:z_virtual_endstop
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PE5
position_endstop: 0
position_max: 200
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: 200
homing_speed: 50

[stepper_z]
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_max: 200

[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: 1.15
drop_first_result: true

[bed_mesh]
mesh_min: 10,10
mesh_max: 180,180

[mcu]
serial: /dev/ttyACM0

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

[gcode_macro NONE_TEST]
gcode:
{% do [1,2].append(3) %}
Loading

0 comments on commit 8759a30

Please sign in to comment.