<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Hy, <div><br></div><div>Thanks for the guide. I can work off my decade+ old MacBook, so I’ll try to get that set up. But will take the advice to wait until the refactoring is done. No point in throwing a monkey wrench into the works. <div><br></div><div>I don’t think it’s affecting the linear algorithm only, but it’s the only time I’ve seen it drive the focuser off the rails (almost literally the first time, to the INDI limits the second time). It might be that previously, the auto star select failure might hold up everything, but that’s just a guess. </div><div><br></div><div>I prefer the auto star because the plot seems much less noisy on a single star. It looks like when I use full field, the HFR calculations are not based off the same sample of stars so the data points don’t fit on the curve as well. Perhaps it’s user error on my end. </div><div><br></div><div>Best, </div><div>Matt<br><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On Apr 2, 2020, at 4:49 PM, Hy Murveit <murveit@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Matt,<div><br></div><div>I wrote up a little guide to contributing to Kstars (broken up into 5 posts) here: <a href="https://indilib.org/forum/development/6171-how-to-start-developing-for-kstars.html">https://indilib.org/forum/development/6171-how-to-start-developing-for-kstars.html</a></div><div>based on my experience and instructions I got from Jasem when I was getting started.</div><div><br></div><div>In general, you send your PRs to jasem who will submit them after review or send you back suggestions.</div><div>For things related to focus, I'd appreciate being cc'd.</div><div><br></div><div>This sounds like a good issue to fix. Why do you think this only affects the Linear focus algorithm (as opposed to the other focus algorithms) or do you think it affects all of them?</div><div>It's true that I don't think I tested for this issue when I wrote the Linear focus algorithm.<br></div><div><br></div><div>I believe that right now Eric (TallFurryMan) is refactoring the focus module and adding tests, and it may not be ideal to be making changes until he sends in his refactor for review, but you can coordinate that with Jasem and Eric.</div><div><br></div><div>I'm happy to answer any questions as well,</div><div><br></div><div>Thanks for your help!</div><div>Hy</div><div><br></div><div>PS, Though it'd be good to fix this, if you're looking for best focus performance, I'd recommend using the Full Field HFR calculation, which would not involve any star selection.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 2, 2020 at 4:30 PM Matthew Wong <<a href="mailto:snoopy_94555@yahoo.com">snoopy_94555@yahoo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello, <br>
<br>
This is my first time posting here, so go easy on me and let me know if I’m at the wrong place. <br>
<br>
I noticed that while using the linear algorithm for autofocus, if the auto select star fails, it would abort the autofocus as expected. However, unlike when autofocus fails to achieve focus, this abort does not return the focuser to its initial position. When used with the scheduler, the autofocus keeps retrying after failure. With enough retries, it moves the focuser to its stop. I’m not even sure if this is a bug rather than user error or faulty expectations, so I figured I’d bring it up here first. <br>
<br>
In any case, I took the liberty to read through the code on github and I think I found why this is happening. In focus.cpp, under Focus::checkAutoStarTimeout, line 2874-2876, initialFocuserAbsPosition is set to -1 before setAutoFocusResult(false) is called. Since the setAutoFocusResult is where the focuser gets returned to the initial position, line 2874 essentially disables this. Again, I’m not sure if this was done in this order for any other specific purposes, but I figure this is why the focuser runs to its stops whenever this happens. <br>
<br>
I’m not normally a C++ programmer outside of the occasional Arduino projects. I mostly work in C# on Win10, so I’m not tool-ed to test this readily. Hopefully, if this is indeed an issue, that this is an easy fix. If anyone want to help me get started on how to contribute, I’ll give it a shot when I get a chance. This would be my first foray into contributing to an open source project, so I’m unfamiliar with the procedures and etiquette. Again, go easy on me. Thanks!<br>
<br>
Have a good day, <br>
Matt<br>
</blockquote></div>
</div></blockquote></div></div></body></html>