summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-17 10:39:33 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-17 10:39:33 (GMT)
commitfe67b8e5c265aa2a4eec4a8a85fee58d219fed35 (patch)
treec83cd24ad1b0b433ad1651ed83b1f31e6bba0d9c
parentc6a8a3187d4d35589cccf779c98dbf89b43e2155 (diff)
On first reverse direction, recapture to hopefully avoid erronous measurement.
-rw-r--r--kstars/ekos/focus.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/kstars/ekos/focus.cpp b/kstars/ekos/focus.cpp
index d7b679d..2f6488d 100644
--- a/kstars/ekos/focus.cpp
+++ b/kstars/ekos/focus.cpp
@@ -254,7 +254,6 @@ void Focus::resetFrame()
{
targetChip->setFrame(orig_x, orig_y, orig_w, orig_h);
frameModified = false;
- subFramed = false;
}
haveDarkFrame=false;
@@ -1518,18 +1517,17 @@ void Focus::autoFocusAbs()
// HFR increased, let's deal with it.
HFRInc++;
HFRDec=0;
- reverseDir = true;
// Reality Check: If it's first time, let's capture again and see if it changes.
- /*if (HFRInc <= 1)
+ if (HFRInc <= 1 && reverseDir == false)
{
capture();
return;
}
// Looks like we're going away from optimal HFR
else
- {*/
-
+ {
+ reverseDir = true;
lastHFR = currentHFR;
lastHFRPos = currentPosition;
initSlopeHFR=0;
@@ -1564,7 +1562,7 @@ void Focus::autoFocusAbs()
if (Options::focusLogging())
qDebug() << "Focus: new targetPosition " << targetPosition;
- //}
+ }
}
// Limit target Pulse to algorithm limits