summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-24 14:34:07 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-24 14:34:07 (GMT)
commit684cb8290cc3b59938654d53116ea001914ffb7f (patch)
tree01c046cf2eaa2751eed67696b303c0514e7e765a
parent65db5ceb2d5d669bf3c6d31e04c7bc22d7126c34 (diff)
Fixing more issues with guiding and subframing in auto-calibrate-guide mode
-rw-r--r--kstars/ekos/guide/guide.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/kstars/ekos/guide/guide.cpp b/kstars/ekos/guide/guide.cpp
index 5acd29a..93ee5cb 100644
--- a/kstars/ekos/guide/guide.cpp
+++ b/kstars/ekos/guide/guide.cpp
@@ -1036,6 +1036,8 @@ void Guide::setGuideAlgorithm(const QString & algorithm)
void Guide::setSubFrameEnabled(bool enable)
{
Options::setGuideSubframeEnabled(enable);
+ if (subFrameCheck->isChecked() != enable)
+ subFrameCheck->setChecked(enable);
}
#if 0
@@ -1046,7 +1048,7 @@ void Guide::setGuideRapidEnabled(bool enable)
#endif
void Guide::setDitherSettings(bool enable, double value)
-{
+{
Options::setDitherEnabled(enable);
Options::setDitherPixels(value);
}
@@ -1065,6 +1067,23 @@ void Guide::startAutoCalibrateGuide()
// A must for auto stuff
Options::setGuideAutoStarEnabled(true);
+ ISD::CCDChip *targetChip = currentCCD->getChip(useGuideHead ? ISD::CCDChip::GUIDE_CCD : ISD::CCDChip::PRIMARY_CCD);
+
+ if (frameSettings.contains(targetChip))
+ {
+ targetChip->resetFrame();
+ int x,y,w,h;
+ targetChip->getFrame(&x, &y, &w, &h);
+ QVariantMap settings = frameSettings[targetChip];
+ settings["x"] = x;
+ settings["y"] = y;
+ settings["w"] = w;
+ settings["h"] = h;
+ frameSettings[targetChip] = settings;
+
+ subFramed = false;
+ }
+
calibrationComplete = false;
autoCalibrateGuide = true;
@@ -1217,6 +1236,8 @@ void Guide::checkExposureValue(ISD::CCDChip *targetChip, double exposure, IPStat
void Guide::setDarkFrameEnabled(bool enable)
{
Options::setGuideDarkFrameEnabled(enable);
+ if (darkFrameCheck->isChecked() != enable)
+ darkFrameCheck->setChecked(enable);
}
void Guide::saveDefaultGuideExposure()
@@ -1845,7 +1866,7 @@ void Guide::buildOperationStack(GuideState operation)
bool Guide::executeOperationStack()
{
- if (operationStack.isEmpty())
+ if (operationStack.isEmpty() || state == GUIDE_ABORTED)
return false;
GuideState nextOperation = operationStack.pop();