Commit 8450f009 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Various fixes for guiding

parent a4bb1d7b
......@@ -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;
......
......@@ -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);
}
}
}
......
......@@ -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:
......
......@@ -214,8 +214,6 @@ bool InternalGuider::dither(double pixels)
// Back to guiding
state = GUIDE_GUIDING;
emit newStatus(state);
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment