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:
<code>
// 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);
</code>
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) )?
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 years 5 months ago by Brian McBride. Reason: missed a bit