I'm getting autofocus failures because, at the end of the first pass, the focus is not moved back out far enough to start the second pass. Sometimes it moves far enough. Sometimes not. I'm using the linear algorithm.
I had a look at the code and found:
// Arbitrarily go back "margin" steps above the best position.
// Could be a problem if backlash were worse than that many steps.
requestedPosition = std::min(static_cast<int>(firstPassBestPosition + stepSize * margin), maxPositionLimit);
The margin value used is 2.
I have changed that to 8, rebuilt from source and confirmed that with a larger margin value the focus is moved far enough to start a second pass.
Is there any interest in modifying the code to either allow some user control of the margin value or having a different default value (maybe min(2, half the initial step multiplier) )?
Could you not accommodate for this limitation by adjusting the out step mulitple in the Focus Mechanics tab?
120 MM Skywatcher Esprit on Celestron CGX, ZWO ASI 224MC guiding, Pegasus FocusCube v2+PPBA
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um. Triad Ultra Quad NB Filter
1) Odroid-N2 Ubuntu-mate 20.04.4 2) StellarMate RPI4 8G
The good, the bad, the ugly at sciencedowneast.no-ip.ca/zenphoto/
I am not familiar with the code, but as far as I can see, the outstep multiplier is not used when computing the 'requestedPostiion' at which to start the second pass. In most cases when calling the setupSecondPass method its uses the default margin value of 2, except in one case when its running of road, it has a last fling with 0.5.
When I wrote 'initial step multiplier' I meant 'outstep multiplier'. Basically I'm suggesting that if it was preferred not to change the UI and create a parameter to allow the user to set the margin value, then using the outstep multiplier somehow might make sense.
Another route might be to figure out how to set a backlash value. I haven't figured out yet why that's disabled, but I'm guessing it might need a change in the GPhoto driver to enable it.
Last edit: 2 months 1 week ago by Brian McBride. Reason: missed a bit