Probe command is going crazy with autolevel sensor.
I have Anet A8 "official" autolevel sensor. In order not to crash my z stepper into the heatbed I have to add into the probe activate_gcode statement and execute gcode like this: G28 X0 Y0 G1 X110 Y110
I found that when it goes down during the probe it goes strange: it starts to move towards X/Y endstops instead of going down.
I solved it by commenting lines 69 and 70 in klippy/extras/probe.py and replacing them with pos = [ None, None, self.z_position]
Otherwise I suppose that they are moving towards 0 X/Y coords. Probably it didn't picked up correctly last coordinates from G1 X110 Y110 and still thinks that it is 0,0
Also I found that in the probe.py:build_config() it tries to add z stepper to the steppers that is already there so that Z endstop object ends up with two copies of the the same stepper instance in the self.steppers array. So it is easily solvable with simple check inside of add_stepper where you check before adding stepper into the list if that object is already there.
Also I found that when I issue G1 X15 Y15 as part of probe's deactivate_gcode to go to the Bottom left position of the heatbed it goes up to the initial Z position it was probing from not the found one.Looks like it is not storing Z position from the probe.
It does not make sense to put movement commands in the probe activate_gcode or deactivate_gcode sequences (don't put G28, G1, or G0 commands there). If you need to perform a particular action in order to safely home your printer, then use a homing_override section to do that. The config/sample-bltouch.cfg provides an example of this.
In the future, be sure to always attach the klipper log file to any problem reports, as described at: https://github.com/KevinOConnor/klipper/blob/master/docs/Contact.md
Thank you Kevin!
It is weird as I did homing_override before and it didn't work the way I want so I tried it through the probe activate_gcode option.
So I removed all probe gcode from probe and modified my homing override like this: [homing_override] #set_position_x: 110 #set_position_y: 110 set_position_z: 0 gcode: G90 ; Uncomment these 2 lines to blindly lift the Z 2mm at start G1 Z7 F600 G28 X0 Y0 G1 X110 Y110 F3600 ; PROBE G28 Z0
And it started to work like a charm.
My question for now is what is the purpose of activate/deactivate_gcode in probe section then?
@skuznetsov Can You Share your whole config? I want to share pins for endstop ant autolevelsensor.
@derdigge here is my config: printer.zip
Please note that my bed tilt coordinates are little modified as my autolevel sensor is connected as per this image:
Thanks. I´ll try this next week.