summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-14 17:01:44 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-14 17:01:44 (GMT)
commit9e82b30fe779d138741c38826acd5e9b4ca3069a (patch)
treee8079cdec9949c96b8ce858381c434f3b08d984b
parent3b7d6e9472988dd55b03a2be3b0f36553ba4a3cd (diff)
Warn users if BLOB was disabled in the camera due to usage of external guiding applications
-rw-r--r--kstars/ekos/capture/capture.cpp7
-rw-r--r--kstars/ekos/guide/guide.cpp55
-rw-r--r--kstars/ekos/guide/guide.h2
3 files changed, 32 insertions, 32 deletions
diff --git a/kstars/ekos/capture/capture.cpp b/kstars/ekos/capture/capture.cpp
index 4f9fb5b..89a7cac 100644
--- a/kstars/ekos/capture/capture.cpp
+++ b/kstars/ekos/capture/capture.cpp
@@ -1829,6 +1829,13 @@ void Capture::prepareJob(SequenceJob *job)
{
activeJob = job;
+ if (currentCCD->getDriverInfo()->getClientManager()->getBLOBMode(currentCCD->getDeviceName()) == B_NEVER)
+ {
+ appendLogText(i18n("Image transfer is disabled for this camera. For guide cameras configured for external guiding applications, please enable remote images in Guide module options."));
+ setBusy(false);
+ return;
+ }
+
// Just notification of active job stating up
emit newImage(NULL, activeJob);
diff --git a/kstars/ekos/guide/guide.cpp b/kstars/ekos/guide/guide.cpp
index 0a44b97..e712938 100644
--- a/kstars/ekos/guide/guide.cpp
+++ b/kstars/ekos/guide/guide.cpp
@@ -342,12 +342,6 @@ void Guide::checkCCD(int ccdNum)
return;
}
- // Reset BLOB mode
- if (currentCCD != NULL)
- {
- currentCCD->getDriverInfo()->getClientManager()->setBLOBMode(B_ALSO, currentCCD->getDeviceName());
- }
-
if (ccdNum <= CCDs.count())
{
currentCCD = CCDs.at(ccdNum);
@@ -364,13 +358,7 @@ void Guide::checkCCD(int ccdNum)
ISD::CCDChip *targetChip = currentCCD->getChip(useGuideHead ? ISD::CCDChip::GUIDE_CCD : ISD::CCDChip::PRIMARY_CCD);
targetChip->setImageView(guideView, FITS_GUIDE);
- if (guiderType != GUIDE_INTERNAL)
- {
- if (Options::guideRemoteImagesEnabled())
- currentCCD->getDriverInfo()->getClientManager()->setBLOBMode(B_ALSO, currentCCD->getDeviceName(), useGuideHead ? "CCD2" : "CCD1");
- else
- currentCCD->getDriverInfo()->getClientManager()->setBLOBMode(B_NEVER, currentCCD->getDeviceName(), useGuideHead ? "CCD2" : "CCD1");
- }
+ updateCCDBlobMode(guiderType);
syncCCDInfo();
}
@@ -1350,7 +1338,10 @@ bool Guide::setGuiderType(int type)
if (type == -1)
type = Options::guiderType();
else if (type == guiderType)
+ {
+ updateCCDBlobMode(type);
return true;
+ }
if (state == GUIDE_CALIBRATING || state == GUIDE_GUIDING || state == GUIDE_DITHERING)
{
@@ -1371,11 +1362,7 @@ bool Guide::setGuiderType(int type)
guider = internalGuider;
- // Receive BLOBs from the driver
- if (currentCCD)
- {
- currentCCD->getDriverInfo()->getClientManager()->setBLOBMode(B_ALSO, currentCCD->getDeviceName(), useGuideHead ? "CCD2" : "CCD1");
- }
+ updateCCDBlobMode(type);
calibrateB->setEnabled(true);
guideB->setEnabled(false);
@@ -1399,13 +1386,7 @@ bool Guide::setGuiderType(int type)
guider = phd2Guider;
// Do NOT receive BLOBs from the driver
- if (currentCCD)
- {
- if (Options::guideRemoteImagesEnabled())
- currentCCD->getDriverInfo()->getClientManager()->setBLOBMode(B_ALSO, currentCCD->getDeviceName(), useGuideHead ? "CCD2" : "CCD1");
- else
- currentCCD->getDriverInfo()->getClientManager()->setBLOBMode(B_NEVER, currentCCD->getDeviceName(), useGuideHead ? "CCD2" : "CCD1");
- }
+ updateCCDBlobMode(type);
calibrateB->setEnabled(false);
captureB->setEnabled(false);
@@ -1422,13 +1403,7 @@ bool Guide::setGuiderType(int type)
guider = linGuider;
- if (currentCCD)
- {
- if (Options::guideRemoteImagesEnabled())
- currentCCD->getDriverInfo()->getClientManager()->setBLOBMode(B_ALSO, currentCCD->getDeviceName(), useGuideHead ? "CCD2" : "CCD1");
- else
- currentCCD->getDriverInfo()->getClientManager()->setBLOBMode(B_NEVER, currentCCD->getDeviceName(), useGuideHead ? "CCD2" : "CCD1");
- }
+ updateCCDBlobMode(type);
calibrateB->setEnabled(true);
captureB->setEnabled(false);
@@ -1457,6 +1432,22 @@ bool Guide::setGuiderType(int type)
return true;
}
+void Guide::updateCCDBlobMode(int type)
+{
+ if (currentCCD)
+ {
+ bool enabled = true;
+
+ if (type != GUIDE_INTERNAL)
+ {
+ // Receive remote BLOBs despite external guider
+ enabled = Options::guideRemoteImagesEnabled();
+ }
+
+ currentCCD->getDriverInfo()->getClientManager()->setBLOBMode(enabled ? B_ALSO : B_NEVER, currentCCD->getDeviceName());
+ }
+}
+
void Guide::updateTrackingBoxSize(int currentIndex)
{
if (currentIndex >= 0)
diff --git a/kstars/ekos/guide/guide.h b/kstars/ekos/guide/guide.h
index 9b276b3..9a95c76 100644
--- a/kstars/ekos/guide/guide.h
+++ b/kstars/ekos/guide/guide.h
@@ -412,6 +412,8 @@ private:
*/
void setBusy(bool enable);
+ void updateCCDBlobMode(int type);
+
// Operation stack
void buildOperationStack(GuideState operation);
bool executeOperationStack();