summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <[email protected]>2016-05-31 09:44:14 +0300
committerJasem Mutlaq <[email protected]>2016-05-31 09:44:14 +0300
commit3c9b48e91fbb5df14920b5e5595cdc1b83f52deb (patch)
tree603e8033b8875f8c8f4ac94c69a8024ee87c29a7
parent60f6852d4fe9de4ba10f2a791a0d17328cabc5db (diff)
Do not find stars on framing
-rw-r--r--kstars/ekos/focus.cpp55
1 files changed, 30 insertions, 25 deletions
diff --git a/kstars/ekos/focus.cpp b/kstars/ekos/focus.cpp
index 54e5bbd..0be4c7c 100644
--- a/kstars/ekos/focus.cpp
+++ b/kstars/ekos/focus.cpp
@@ -884,44 +884,49 @@ void Focus::newFITS(IBLOB *bp)
disconnect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
- image_data->findStars();
+ // If we're not framing, let's try to detect stars
+ if (inFocusLoop == false)
+ {
+ image_data->findStars();
- currentHFR= image_data->getHFR(HFR_MAX);
+ currentHFR= image_data->getHFR(HFR_MAX);
- if (currentHFR == -1)
- {
- currentHFR = image_data->getHFR();
- }
+ if (currentHFR == -1)
+ {
+ currentHFR = image_data->getHFR();
+ }
- if (Options::focusLogging())
- qDebug() << "Focus newFITS: Current HFR " << currentHFR;
+ if (Options::focusLogging())
+ qDebug() << "Focus newFITS: Current HFR " << currentHFR;
- HFRText = QString("%1").arg(currentHFR, 0,'g', 3);
+ HFRText = QString("%1").arg(currentHFR, 0,'g', 3);
- if (inFocusLoop == false && focusType == FOCUS_MANUAL && lastHFR == -1)
- appendLogText(i18n("FITS received. No stars detected."));
+ if (focusType == FOCUS_MANUAL && lastHFR == -1)
+ appendLogText(i18n("FITS received. No stars detected."));
- HFROut->setText(HFRText);
+ HFROut->setText(HFRText);
- if (currentHFR > 0)
- {
- if (currentHFR > maxHFR)
- maxHFR = currentHFR;
+ if (currentHFR > 0)
+ {
+ if (currentHFR > maxHFR)
+ maxHFR = currentHFR;
- if (hfr_position.empty())
- hfr_position.append(1);
- else
- hfr_position.append(hfr_position.last()+1);
- hfr_value.append(currentHFR);
+ if (hfr_position.empty())
+ hfr_position.append(1);
+ else
+ hfr_position.append(hfr_position.last()+1);
+ hfr_value.append(currentHFR);
- if (focusType == FOCUS_MANUAL || (inAutoFocus && canAbsMove == false && canRelMove == false))
- drawHFRPlot();
+ if (focusType == FOCUS_MANUAL || (inAutoFocus && canAbsMove == false && canRelMove == false))
+ drawHFRPlot();
+ }
}
-
- if (inFocusLoop)
+ // If just framing, let's capture again
+ else
{
capture();
return;
+
}
if (starSelected == false)