<font face="Arial, Verdana">Sometimes (not always) while bed leveling is in progress I'm getting error:</font>
"z-probe did not untrigger after going back to start position."
Code for that does:
// Go back to start position
PrintLine::moveRelativeDistanceInSteps(0, 0, lastCorrection - currentPositionSteps[Z_AXIS], 0, EEPROM::zProbeSpeed(), true, true);
if(Endstops::zProbe()) {
Com::printErrorFLN(PSTR("z-probe did not untrigger after going back to start position."));
return ILLEGAL_Z_PROBE;
}
Now my z-probe is induction sensor with LED on it and LED goes off, when bed moves away from sensor, indicating that it did untrigger.
While looking at the firmware I see that M119 command is handled this way:
<font face="Arial, Verdana"> case 119: // M119</font>
<font face="Arial, Verdana"> Commands::waitUntilEndOfAllMoves();</font>
<font face="Arial, Verdana"> Endstops::update();</font>
<font face="Arial, Verdana"> Endstops::update(); // double test to get right signal. Needed for crosstalk protection.</font>
<font face="Arial, Verdana"> Endstops::report();</font>
<font face="Arial, Verdana"> break;</font>
Note two Endstops::update(). Bud there are no such precausions in if(Endstops::zProbe()) condition.
My question is - why is that handled differently? Shouldn't there be Endstops::update() twice before testing Endstops::zProbe() condition?