<div dir="ltr">Eric,<br><div><br></div><div>I am running with MR144. In fact it was running through commit 79ff9655db804db1ac87df23023164172ba84605</div><div>so, MR144 didn't fix that.</div><div><br></div><div>Please check out the log or snippets or let me know if it's unclear.</div><div><br></div><div>Hy</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 10, 2020 at 12:37 PM Eric Dejouhanet <<a href="mailto:eric.dejouhanet@gmail.com">eric.dejouhanet@gmail.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"><div style="background-color:rgb(255,255,255);background-image:initial;line-height:initial"><div id="gmail-m_8894725905523704278response_container_BBPPID" style="outline:none" dir="auto"> <div name="BB10" id="gmail-m_8894725905523704278BB10_response_div_BBPPID" dir="auto" style="width:100%"> Thanks for noticing that Hy! </div><div name="BB10" id="gmail-m_8894725905523704278BB10_response_div_BBPPID" dir="auto" style="width:100%"><br></div><div name="BB10" id="gmail-m_8894725905523704278BB10_response_div_BBPPID" dir="auto" style="width:100%">I was under the impression that this case was covered by the tests I added in test_ekos_focus. I do verify that an autofocus that fails does not prevent a subsequent autofocus from succeeding. </div><div name="BB10" id="gmail-m_8894725905523704278BB10_response_div_BBPPID" dir="auto" style="width:100%"><br></div><div name="BB10" id="gmail-m_8894725905523704278BB10_response_div_BBPPID" dir="auto" style="width:100%">Ah you are looking at the preliminary MR. Since then, we merged MR144 that fixed that situation. It is very unfortunate that v3.5.0 got out in-between. </div> <div id="gmail-m_8894725905523704278blackberry_signature_BBPPID" name="BB10" dir="auto"> <div id="gmail-m_8894725905523704278_signaturePlaceholder_BBPPID" name="BB10" dir="auto"><p dir="ltr"><a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a> - <a href="https://astronomy.dejouha.net" target="_blank">https://astronomy.dejouha.net</a></p></div> </div></div><div id="gmail-m_8894725905523704278_original_msg_header_BBPPID" dir="auto"> <table width="100%" style="border-spacing:0px;display:table;outline:none"><tbody><tr><td colspan="2" style="padding:initial;font-size:initial;text-align:initial"> <div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in;font-family:Tahoma,"BB Alpha Sans","Slate Pro";font-size:10pt"> <div id="gmail-m_8894725905523704278from"><b>De:</b> <a href="mailto:murveit@gmail.com" target="_blank">murveit@gmail.com</a></div><div id="gmail-m_8894725905523704278sent"><b>Envoyé:</b> 10 décembre 2020 21:15</div><div id="gmail-m_8894725905523704278to"><b>À:</b> <a href="mailto:eric.dejouhanet@gmail.com" target="_blank">eric.dejouhanet@gmail.com</a>; <a href="mailto:kstars-devel@kde.org" target="_blank">kstars-devel@kde.org</a></div><div id="gmail-m_8894725905523704278reply_to"><b>Répondre à:</b> <a href="mailto:hy@murveit.com" target="_blank">hy@murveit.com</a></div><div id="gmail-m_8894725905523704278subject"><b>Objet:</b> issue with MR prevent duplicate focus execution</div></div></td></tr></tbody></table> <br> </div><div name="BB10" dir="auto" style="background-image:initial;line-height:initial;outline:none"><div dir="ltr">Eric,<div><br></div><div>I stumbled on this issue with your recent MR. "prevent duplicate focus execution"</div><div><a href="https://invent.kde.org/education/kstars/-/merge_requests/141" target="_blank">https://invent.kde.org/education/kstars/-/merge_requests/141</a><br></div><div><br></div><div>Basically, focus fails (no stars detected for reasons unimportant here), goes back to its initial position, and decides to restart, </div><div>but when it restarts it says it can't restart because autofocus is already running!</div><div><br></div><div>I guess when it decides to restart itself, it probably needs to deal with the inAutoFocus variable somehow</div><div>Perhaps it's as simple as just setting inAutoFocus to false before the call to start() on lines 2651, 2688, 2726, 2748, </div><div><br></div><div>However, since you've looked at this logic recently, I think you're in a better position</div><div>to make this change (or just tell me that my suggestion looks OK and I can send in that MR).</div><div><br></div><div>Hy</div><div><br></div><div>Log: <a href="https://drive.google.com/file/d/1CF89JedlhJ3e5BHkebZHbALDiS_Unm2S/view?usp=sharing" target="_blank">https://drive.google.com/file/d/1CF89JedlhJ3e5BHkebZHbALDiS_Unm2S/view?usp=sharing</a><br></div><div><br></div><div>Snippets from the above log:</div><div><br></div><div>[2020-12-10T03:31:17.161 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Focus newFITS # 1 : Current HFR -1 Num stars 0<br>[2020-12-10T03:31:17.288 PST INFO ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - "Failed to detect any stars. Reset frame and try again."<br>[2020-12-10T03:31:17.289 PST INFO ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - "Focus procedure completed after 8 iterations."<br>[2020-12-10T03:31:17.289 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Stopping Focus<br><br>[2020-12-10T03:31:17.289 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Stopping Focus<br>[2020-12-10T03:31:17.318 PST DEBG ][ <a href="http://org.kde.kstars.ekos.capture" target="_blank">org.kde.kstars.ekos.capture</a>] - Guiding state changed from "Suspended" to "Guiding"<br>[2020-12-10T03:31:17.319 PST INFO ][ <a href="http://org.kde.kstars.ekos.guide" target="_blank">org.kde.kstars.ekos.guide</a>] - "Guiding resumed."<br>[2020-12-10T03:31:17.319 PST DEBG ][ <a href="http://org.kde.kstars.ekos.guide" target="_blank">org.kde.kstars.ekos.guide</a>] - Capturing frame...<br>[2020-12-10T03:31:17.319 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - State: "Aborted"<br>[2020-12-10T03:31:17.320 PST DEBG ][ <a href="http://org.kde.kstars.ekos.capture" target="_blank">org.kde.kstars.ekos.capture</a>] - setFocusStatus: 3<br>[2020-12-10T03:31:17.321 PST DEBG ][ <a href="http://org.kde.kstars.ekos.scheduler" target="_blank">org.kde.kstars.ekos.scheduler</a>] - Guide State "Guiding"<br>[2020-12-10T03:31:17.323 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - AutoFocus result: false<br><span style="background-color:rgb(255,255,0)">[2020-12-10T03:31:17.324 PST INFO ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - "Autofocus failed, moving back to initial focus position 11592."</span><br>[2020-12-10T03:31:17.324 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Frame is reset. X: 0 Y: 0 W: 4656 H: 3520 binX: 1 binY: 1<br>[2020-12-10T03:31:17.349 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Settled. State: "Failed"<br>[2020-12-10T03:31:17.350 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Check Focus requested with minimum required HFR 0.01<br>[2020-12-10T03:31:17.350 PST DEBG ][ <a href="http://org.kde.kstars.ekos.capture" target="_blank">org.kde.kstars.ekos.capture</a>] - setFocusStatus: 5<br><br>[2020-12-10T03:31:17.669 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Abs Focuser position changed to 12327 (state = 2 )<br>[2020-12-10T03:31:18.213 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Abs Focuser position changed to 12199 (state = 2 )<br>[2020-12-10T03:31:18.759 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Abs Focuser position changed to 12071 (state = 2 )<br>[2020-12-10T03:31:19.317 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Abs Focuser position changed to 11940 (state = 2 )<br>[2020-12-10T03:31:19.865 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Abs Focuser position changed to 11812 (state = 2 )<br>[2020-12-10T03:31:20.405 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Abs Focuser position changed to 11684 (state = 2 )<br>[2020-12-10T03:31:20.948 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Abs Focuser position changed to 11592 (state = 2 )<br><span style="background-color:rgb(255,255,0)">[2020-12-10T03:31:20.981 PST INFO ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - "Restarting autofocus process..."</span><br>[2020-12-10T03:31:20.987 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Starting focus with box size: 64 Subframe: no Autostar: no Full frame: yes [ 25 %, 75 %] Step Size: 25 Threshold: 150 Gaussian Sigma: 1.5 Gaussian Kernel size: 5 Multi row average: 3 Tolerance: 10 Frames: 1 Maximum Travel: 10000<br><br><br>[2020-12-10T03:31:25.388 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Focus newFITS # 1 : Current HFR 1.70595 Num stars 5<br>[2020-12-10T03:31:25.508 PST DEBG ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - Current HFR: 1.70595 is above required minimum HFR: 0.01 . Starting AutoFocus...<br><span style="background-color:rgb(255,255,0)">[2020-12-10T03:31:25.508 PST INFO ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - "Autofocus is already running, discarding start request."</span><br>[2020-12-10T03:31:25.508 PST INFO ][ <a href="http://org.kde.kstars.ekos.focus" target="_blank">org.kde.kstars.ekos.focus</a>] - "Detection complete."<br></div><div><br></div><div><br></div></div>
</div></div></blockquote></div>