summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-07-19 20:54:06 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-07-19 20:54:06 (GMT)
commita62fdae0b9c9caed63ca161524d049397849debe (patch)
treedbf0c49313c30f81a7a07df3b3198713f5641a1d
parent1cebe1db144649119047daddcb15f93b396b6bed (diff)
DO not crash if dark image is not properly captured, try again
-rw-r--r--kstars/ekos/align.cpp10
-rw-r--r--kstars/ekos/align.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/kstars/ekos/align.cpp b/kstars/ekos/align.cpp
index 0155ad5..7b3844c 100644
--- a/kstars/ekos/align.cpp
+++ b/kstars/ekos/align.cpp
@@ -722,7 +722,11 @@ void Align::newFITS(IBLOB *bp)
delete (darkBuffer);
FITSView *calibrateImage = targetChip->getImage(FITS_CALIBRATE);
- Q_ASSERT(calibrateImage != NULL);
+ if (calibrateImage == NULL)
+ {
+ captureAndSolve();
+ return;
+ }
FITSData *calibrateData = calibrateImage->getImageData();
@@ -1840,9 +1844,9 @@ void Align::checkCCDExposureProgress(ISD::CCDChip *targetChip, double remaining,
}
}
-void Align::updateFocusStatus(bool status)
+void Align::updateFocusStatus(Ekos::FocusState state)
{
- isFocusBusy = status;
+ isFocusBusy = state >= Ekos::FOCUS_PROGRESS;
}
void Align::setSolverOverlay(bool enable)
diff --git a/kstars/ekos/align.h b/kstars/ekos/align.h
index 9b083f7..95e9dc8 100644
--- a/kstars/ekos/align.h
+++ b/kstars/ekos/align.h
@@ -282,7 +282,7 @@ public slots:
void setLockedFilter(ISD::GDInterface *filter, int lockedPosition);
- void updateFocusStatus(bool status);
+ void updateFocusStatus(FocusState state);
private slots:
/* Solver Options */