jlas1 / Klicky-Probe

Microswitch probe with magnetic attachement, primarily aimed at CoreXY 3d printers
GNU General Public License v3.0
1.23k stars 279 forks source link

DOCK_PROBE does not check the current state of the probe when executed for the first time. #174

Open 7R0J4Ner opened 1 year ago

7R0J4Ner commented 1 year ago

Problem: If the Klicky-Switch is attached manually, the 1st time DOCK_PROBE is executed, the wrong state is displayed and Klipper thinks that the switch is already in the dock. (Which unfortunately just led to me destroying a switch).

to Replicate:

  1. turn on printer
  2. home XYZ
  3. remove the clicky switch from the dock by hand and attach it to the toolhead
  4. execute "DOCK_PROBE"

Now the switch should theoretically go into the dock, but I get the message "Probe already docked" followed by "probe: open" in the console.

If I now execute "DOCK_PROBE" again, everything works as intended.

As I can see from the console, the state is only queried after the command for docking, is that the way it is supposed to be?

If this is the case, how can I make sure that every time I run "DOCK_PROBE", the current state is taken into account first, not just the last state?