Skip to content

Commit b0c6e16

Browse files
committed
probe_eddy_current: show noise at distinct calibration points
Signed-off-by: Timofey Titovets <[email protected]>
1 parent 901e17f commit b0c6e16

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

klippy/extras/probe_eddy_current.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,21 @@ def post_manual_probe(self, kin_pos):
208208
avg_mad = sum(total_mad)/len(total_mad)
209209
avg_mad_mm = sum(total_mad_mm)/len(total_mad_mm)
210210
gcode.respond_info(
211-
"probe_eddy_current: MAD=%.3fHz ~ %.6fmm in %d queries\n"
211+
"probe_eddy_current: MAD=%.3fHz ~ %.6fmm in %d queries\n" % (
212+
avg_mad, avg_mad_mm, total))
213+
freq_list = [freq for _, freq in filtered]
214+
freq_diff = max(freq_list) - min(freq_list)
215+
gcode.respond_info("Total frequency range: %.3fHz\n" % (freq_diff))
216+
skip = 5
217+
for i in range(skip, len(filtered), (len(filtered) - skip)//5):
218+
pos, _ = filtered[i]
219+
mad = total_mad[i]
220+
mad_mm = total_mad_mm[i]
221+
gcode.respond_info("z_offset: %.3f MAD=%.3fHz ~ %.6fmm\n" % (
222+
pos, mad, mad_mm))
223+
gcode.respond_info(
212224
"The SAVE_CONFIG command will update the printer config file\n"
213-
"and restart the printer." % (avg_mad, avg_mad_mm, total))
225+
"and restart the printer.")
214226
# Save results
215227
cal_contents = []
216228
for i, (pos, freq) in enumerate(filtered):

0 commit comments

Comments
 (0)