INDI Library v1.9.6 Released (21 May 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Autofocus failure

  • Posts: 8
  • Thank you received: 0
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) )?

[Hardware = EOS R + canon 300mm, driver = GPhoto]
2 months 2 weeks ago #82278

Please Log in or Create an account to join the conversation.

  • Posts: 335
  • Thank you received: 48

Replied by Jerry Black on topic Autofocus failure

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/
2 months 2 weeks ago #82281

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 0

Replied by Brian McBride on topic Autofocus failure

Hi Jerry,

Thanks for responding.

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
2 months 1 week ago #82286

Please Log in or Create an account to join the conversation.

Time to create page: 0.356 seconds