summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-21 20:48:08 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-21 20:48:08 (GMT)
commitd7d72589b6dcb9849b7f240a99ee8f03b0d1bfaa (patch)
tree3dc00a5c29eafefb018bba6dda9f268339e8b150
parent139cc1cf9e5b91297aab75922f2bbc7558893500 (diff)
Increase subframe capture size since star can sometimes move a bit around and we do not want to lose it. Also reset first load upon subframing so that the frame is adjusted properly
-rw-r--r--kstars/ekos/focus/focus.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/kstars/ekos/focus/focus.cpp b/kstars/ekos/focus/focus.cpp
index 8073118..3702b94 100644
--- a/kstars/ekos/focus/focus.cpp
+++ b/kstars/ekos/focus/focus.cpp
@@ -691,7 +691,7 @@ void Focus::start()
Options::setFocusExposure(exposureIN->value());
Options::setFocusXBin(activeBin);
Options::setFocusMaxTravel(maxTravelIN->value());
-
+ Options::setFocusBoxSize(focusBoxSize->value());
Options::setFocusSubFrame(kcfg_subFrame->isChecked());
Options::setFocusAutoStarEnabled(autoStarCheck->isChecked());
Options::setSuspendGuiding(suspendGuideCheck->isChecked());
@@ -1143,10 +1143,10 @@ void Focus::setCaptureComplete()
if (subFramed == false && kcfg_subFrame->isEnabled() && kcfg_subFrame->isChecked())
{
int offset = focusBoxSize->value();
- int subX=(maxStar->x - offset) * subBinX;
- int subY=(maxStar->y - offset) * subBinY;
- int subW=offset*2*subBinX;
- int subH=offset*2*subBinY;
+ int subX=(maxStar->x - offset*1.5) * subBinX;
+ int subY=(maxStar->y - offset*1.5) * subBinY;
+ int subW=offset*3*subBinX;
+ int subH=offset*3*subBinY;
int minX, maxX, minY, maxY, minW, maxW, minH, maxH;
targetChip->getFrameMinMax(&minX, &maxX, &minY, &maxY, &minW, &maxW, &minH, &maxH);
@@ -1189,6 +1189,8 @@ void Focus::setCaptureComplete()
subFramed = true;
+ focusView->setFirstLoad(true);
+
capture();
}
else
@@ -2086,10 +2088,10 @@ void Focus::focusStarSelected(int x, int y)
targetChip->getFrameMinMax(&minX, &maxX, &minY, &maxY, &minW, &maxW, &minH, &maxH);
//targetChip->getFrame(&fx, &fy, &fw, &fy);
- x = (x - offset) * subBinX;
- y = (y - offset) * subBinY;
- int w=offset*2*subBinX;
- int h=offset*2*subBinY;
+ x = (x - offset*1.5) * subBinX;
+ y = (y - offset*1.5) * subBinY;
+ int w=offset*3*subBinX;
+ int h=offset*3*subBinY;
if (x<minX)
x=minX;
@@ -2122,6 +2124,8 @@ void Focus::focusStarSelected(int x, int y)
subFramed = true;
+ focusView->setFirstLoad(true);
+
capture();
//starRect = QRect((w-focusBoxSize->value())/(subBinX*2), (h-focusBoxSize->value())/(subBinY*2), focusBoxSize->value()/subBinX, focusBoxSize->value()/subBinY);