I found a bug in axis_twist_compensation where Y-axis compensation is applied at the wrong bed coordinates when the probe has a non-zero y_offset. The same bug also affects X compensation for probes with x_offset != 0.
The Bug
In _update_z_compensation_value, the compensation lookup uses pos.test_x and pos.test_y (probe coordinates). However, compensation_start_x/y and compensation_end_x/y are stored in nozzle coordinates during calibration. This means the lookup is shifted by the probe offset amount, and compensation gets applied at the wrong physical location.
How I Found It
I took bed meshes with and without Y twist compensation enabled and compared them. The X compensation diff clearly matched the stored z_compensations pattern. But the Y compensation diff did not match zy_compensations at all â it was shifted by my probeâs y_offset (22.9mm).
Who It Affects
Any probe with y_offset != 0 using Y-axis twist compensation: Beacon, Cartographer, offset BLTouch, etc. X compensation is similarly affected for probes with x_offset != 0, though many common probes have x_offset=0.
This was independently reported by @Murdo in topic #21633 with a Cartographer probe (y_offset ~23.7mm), though that thread was closed without a fix.
The Fix
Change pos.test_x to pos.bed_x and pos.test_y to pos.bed_y in _update_z_compensation_value. This makes the lookup use nozzle coordinates, matching the coordinate space of the stored boundaries. Two-line change.
Iâve submitted a PR: https:/ /github.com/Klipper3d/klipper/pull/7246 (Canât add links as itâs a new account)
Hi RamonSaboya, and welcome. I see that the topic you linked only had Murdo responding to himself, and I would be surprised if you get much of a response as well.
The Klipper bros donât have time for anything that isnât âtheirsâ and pretty much disregard or dismiss anybody seeking help with the dirty flag.
Itâs disappointing, because obviously there are talented people with the skill and desire to implement and incorporate many of these extras so they wouldnât be quarantined.
According to your log, youâre using custom code for the beacon probe AND custom beacon axis twist compensation code. If the behavior can be reproduced on plain Klipper (maybe you can configure the beacon as an eddy current probe), then we can deduce the error is in Klipper. If the error goes away, the issue is in the beacon custom axis twist compensation code.