From 4d9d57c0bd811e63bc911f6fad4ce039348aa2be Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 26 Jan 2026 18:38:39 -0500 Subject: [PATCH] test: Add a bed_mesh test case Signed-off-by: Timofey Titovets Signed-off-by: Kevin O'Connor --- test/klippy/bed_mesh.cfg | 81 +++++++++++++++++++++++++++++++++++++++ test/klippy/bed_mesh.test | 13 +++++++ 2 files changed, 94 insertions(+) create mode 100644 test/klippy/bed_mesh.cfg create mode 100644 test/klippy/bed_mesh.test diff --git a/test/klippy/bed_mesh.cfg b/test/klippy/bed_mesh.cfg new file mode 100644 index 000000000..a3a56d92a --- /dev/null +++ b/test/klippy/bed_mesh.cfg @@ -0,0 +1,81 @@ +# Test config for bed_mesh +[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: PC7 +z_offset: 1.15 + +[bed_mesh] +mesh_min: 10,10 +mesh_max: 180,180 +probe_count: 7, 7 +algorithm: bicubic +faulty_region_1_min: 21.422, 87.126 +faulty_region_1_max: 42.922, 129.126 +faulty_region_2_min: 54.172, 97.376 +faulty_region_2_max: 100.172, 150.876 + +[mcu] +serial: /dev/ttyACM0 + +[printer] +kinematics: cartesian +max_velocity: 300 +max_accel: 3000 +max_z_velocity: 5 +max_z_accel: 100 diff --git a/test/klippy/bed_mesh.test b/test/klippy/bed_mesh.test new file mode 100644 index 000000000..bf104755d --- /dev/null +++ b/test/klippy/bed_mesh.test @@ -0,0 +1,13 @@ +# Test case for bed_mesh tests +CONFIG bed_mesh.cfg +DICTIONARY atmega2560.dict + +# Start by homing the printer. +G28 +G1 F6000 +G1 X60 Y60 Z10 + +# Run bed_mesh_calibrate +BED_MESH_CALIBRATE + +G1 Z10