summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-30 20:53:29 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-30 20:53:29 (GMT)
commit8450f009c2976ca7df915414855cd74eec172bb6 (patch)
tree80dc894213abf84969dbf076bbda70235b79ccbf
parenta4bb1d7b38d80ee5757a9e6806a96e4a43424f6c (diff)
Various fixes for guiding
-rw-r--r--kstars/ekos/guide/externalguide/linguider.cpp2
-rw-r--r--kstars/ekos/guide/externalguide/phd2.cpp3
-rw-r--r--kstars/ekos/guide/guide.cpp30
-rw-r--r--kstars/ekos/guide/internalguide/internalguider.cpp2
4 files changed, 21 insertions, 16 deletions
diff --git a/kstars/ekos/guide/externalguide/linguider.cpp b/kstars/ekos/guide/externalguide/linguider.cpp
index 9d7ddea..23be233 100644
--- a/kstars/ekos/guide/externalguide/linguider.cpp
+++ b/kstars/ekos/guide/externalguide/linguider.cpp
@@ -272,8 +272,6 @@ void LinGuider::processResponse(LinGuiderCommand command, const QString &reply)
emit newStatus(GUIDE_DITHERING_ERROR);
state = GUIDING;
- // Back to guiding
- emit newStatus(GUIDE_GUIDING);
deviationTimer.start();
break;
diff --git a/kstars/ekos/guide/externalguide/phd2.cpp b/kstars/ekos/guide/externalguide/phd2.cpp
index 02f8770..645323b 100644
--- a/kstars/ekos/guide/externalguide/phd2.cpp
+++ b/kstars/ekos/guide/externalguide/phd2.cpp
@@ -338,9 +338,6 @@ void PHD2::processPHD2Event(const QJsonObject &jsonEvent)
{
state = DITHER_SUCCESSFUL;
emit newStatus(Ekos::GUIDE_DITHERING_SUCCESS);
-
- // Back to guiding
- emit newStatus(Ekos::GUIDE_GUIDING);
}
}
}
diff --git a/kstars/ekos/guide/guide.cpp b/kstars/ekos/guide/guide.cpp
index a92cdac..2d9e966 100644
--- a/kstars/ekos/guide/guide.cpp
+++ b/kstars/ekos/guide/guide.cpp
@@ -631,6 +631,9 @@ bool Guide::captureOneFrame()
#endif
connect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)), Qt::UniqueConnection);
+ if (Options::guideLogging())
+ qDebug() << "Guide: Capturing frame...";
+
targetChip->capture(seqExpose);
return true;
@@ -989,18 +992,25 @@ bool Guide::guide()
bool Guide::dither()
{
- //return guider->dither(Options::ditherPixels());
- state = GUIDE_DITHERING;
- return true;
+ if (guiderType == GUIDE_INTERNAL)
+ {
+ if (state != GUIDE_GUIDING)
+ capture();
+
+ state = GUIDE_DITHERING;
+
+ return true;
+ }
+ else
+ return guider->dither(Options::ditherPixels());
}
bool Guide::suspend()
{
if (state == GUIDE_SUSPENDED)
return true;
-
- if (state == GUIDE_GUIDING)
- return guider->suspend();
+ else if (state >= GUIDE_CAPTURE)
+ return guider->suspend();
else
return false;
}
@@ -1009,8 +1019,7 @@ bool Guide::resume()
{
if (state == GUIDE_GUIDING)
return true;
-
- if (state == GUIDE_SUSPENDED)
+ else if (state == GUIDE_SUSPENDED)
return guider->resume();
else
return false;
@@ -1193,8 +1202,11 @@ void Guide::setStatus(Ekos::GuideState newState)
break;
case GUIDE_DITHERING_SUCCESS:
- appendLogText(i18n("Dithering completed successfully."));
+ appendLogText(i18n("Dithering completed successfully. Resuming guiding..."));
+ emit newStatus(state);
+ // Go back to guiding state immediately
state = GUIDE_GUIDING;
+ emit newStatus(state);
capture();
break;
default:
diff --git a/kstars/ekos/guide/internalguide/internalguider.cpp b/kstars/ekos/guide/internalguide/internalguider.cpp
index 677b1cd..8b42e37 100644
--- a/kstars/ekos/guide/internalguide/internalguider.cpp
+++ b/kstars/ekos/guide/internalguide/internalguider.cpp
@@ -214,8 +214,6 @@ bool InternalGuider::dither(double pixels)
// Back to guiding
state = GUIDE_GUIDING;
- emit newStatus(state);
-
}
else
{