<div dir="ltr">Hello Wolfgang,<div><br></div><div>Maybe one way to approach this is to fix it in both places? INDI should not send unnecessary property updates without any change and Ekos should handle this case nonetheless.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>--</div><div>Best Regards,<br>Jasem Mutlaq<br></div><div><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 7, 2020 at 9:16 AM Wolfgang Reissenberger <<a href="mailto:sterne-jaeger@openfuture.de">sterne-jaeger@openfuture.de</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="overflow-wrap: break-word;">When running EKOS autofocus with a FocusLynx focuser, the warning "Capture called while already in progress“ appears in the log file. Here is a sample.<div><br></div><div><div>[2020-05-06T22:06:56.629 CEST DEBG ][ org.kde.kstars.ekos.focus] - "Abs Focuser position changed to 17200"</div><div>[2020-05-06T22:06:56.674 CEST DEBG ][ org.kde.kstars.ekos.capture] - setFocusStatus: 5</div><div>[2020-05-06T22:06:56.675 CEST INFO ][ org.kde.kstars.ekos.focus] - "Capturing image..."</div><div>[2020-05-06T22:06:56.676 CEST WARN ][ org.kde.kstars.ekos.focus] - Capture called while already in progress. Capture is ignored.</div><div>[2020-05-06T22:06:56.726 CEST DEBG ][ org.kde.kstars.indi] - MI CCD G2-8300 : "[DEBUG] The Final image area is (0, 0), (3358, 2536) "</div><div>[2020-05-06T22:06:57.624 CEST DEBG ][ org.kde.kstars.indi] - MI CCD G2-8300 : "[DEBUG] Taking a 5.000 seconds frame... "</div><div>[2020-05-06T22:06:57.624 CEST DEBG ][ org.kde.kstars.indi] - MI CCD G2-8300 : "[DEBUG] Exposure in progress: Time left 5.00s "</div><div>[2020-05-06T22:06:57.663 CEST DEBG ][ org.kde.kstars.ekos.focus] - "processFocusNumber FOCUS_TEMPERATURE ERROR"</div><div>[2020-05-06T22:06:57.665 CEST DEBG ][ org.kde.kstars.ekos.focus] - "processFocusNumber ABS_FOCUS_POSITION OK"</div><div>[2020-05-06T22:06:57.665 CEST DEBG ][ org.kde.kstars.ekos.focus] - "Abs Focuser position changed to 17200"</div><div>[2020-05-06T22:06:57.673 CEST WARN ][ org.kde.kstars.ekos.focus] - Capture called while already in progress. Capture is ignored.</div><div>[2020-05-06T22:06:58.626 CEST DEBG ][ org.kde.kstars.indi] - MI CCD G2-8300 : "[DEBUG] Exposure in progress: Time left 4.00s "</div><div>[2020-05-06T22:06:58.673 CEST WARN ][ org.kde.kstars.ekos.focus] - Capture called while already in progress. Capture is ignored.</div><div>[2020-05-06T22:06:58.700 CEST DEBG ][ org.kde.kstars.ekos.focus] - "processFocusNumber FOCUS_TEMPERATURE ERROR"</div><div>[2020-05-06T22:06:58.702 CEST DEBG ][ org.kde.kstars.ekos.focus] - "processFocusNumber ABS_FOCUS_POSITION OK"</div><div>[2020-05-06T22:06:58.702 CEST DEBG ][ org.kde.kstars.ekos.focus] - "Abs Focuser position changed to 17200"</div></div><div><br></div><div>The problem seems to be that FocusLynx reports <span style="color:rgb(0,0,0)">ABS_FOCUS_POSITION with every refresh, i.e. typically once a second, even if the position did not change. See </span></div><div><span style="color:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">FocusLynxBase</span>::<span style="font-weight:600;font-style:italic;color:rgb(0,103,124)">TimerHit</span>()</div>
<div><br></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">On the other side, the EKOS focus module tries to issue a capture() at any time it receives </span><span style="color:rgb(0,0,0)">ABS_FOCUS_POSITION with status OK:</span></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">Focus</span>::<span style="font-weight:600;color:rgb(0,103,124)">processFocusNumber</span>(<span style="color:rgb(128,0,128)">INumberVectorProperty</span><span style="color:rgb(192,192,192)"> </span>*<span style="color:rgb(9,46,100)">nvp</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px">{</pre>
<pre style="margin-top:0px;margin-bottom:0px">…</pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">if</span><span style="color:rgb(192,192,192)"> </span>(!<span style="color:rgb(0,103,124)">strcmp</span>(<span style="color:rgb(9,46,100)">nvp</span>-><span style="color:rgb(128,0,0)">name</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"ABS_FOCUS_POSITION"</span>))</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>{</pre>…</pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">if</span><span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(128,0,0)">canAbsMove</span><span style="color:rgb(192,192,192)"> </span>&&<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">inAutoFocus</span>)</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>{</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,103,124)">autoFocusProcessPositionChange</span>(<span style="color:rgb(9,46,100)">nvp</span>-><span style="color:rgb(128,0,0)">s</span>);</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">where <span style="color:rgb(0,103,124)">autoFocusProcessPositionChange() </span>triggers</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">QTimer</span>::<span style="color:rgb(0,103,124)">singleShot</span>(<span style="color:rgb(128,0,0)">FocusSettleTime</span>-><span style="color:rgb(0,103,124)">value</span>()<span style="color:rgb(192,192,192)"> </span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">1000</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span>,<span style="color:rgb(192,192,192)"> </span>&<span style="color:rgb(128,0,128)">Ekos</span>::<span style="color:rgb(128,0,128)">Focus</span>::<span style="color:rgb(0,103,124)">capture</span>);</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="Arial">My question here is where we should fix it. From my perspective, the behavior of FocusLynx is OK and we should capture this situation within EKOS focus.cpp</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="Arial"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="Arial">Any opinions?</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="Arial"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="Arial">Wolfgang</font></pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><br></pre><div><br></div></pre><div><br></div>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><div><br></div></pre></div></div></blockquote></div>