Commit 41555bf4 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Fixing image capture issue after a pulse command is issued. Now we wait for...

Fixing image capture issue after a pulse command is issued. Now we wait for the duration of the pulse command before starting the capture of an image
parent b520ea01
......@@ -247,8 +247,15 @@ void Guide::newFITS(IBLOB *bp)
ISD::CCDChip *targetChip = currentCCD->getChip(useGuideHead ? ISD::CCDChip::GUIDE_CCD : ISD::CCDChip::PRIMARY_CCD);
FITSView *targetImage = targetChip->getImage(FITS_GUIDE);
if (targetImage == NULL)
return;
FITSImage *image_data = targetImage->getImageData();
if (image_data == NULL)
return;
image_data->findStars();
pmath->set_image(targetImage);
......@@ -270,8 +277,8 @@ void Guide::newFITS(IBLOB *bp)
pmath->do_processing();
calibration->process_calibration();
if (calibration->is_calibrating())
capture();
//if (calibration->is_calibrating())
// capture();
if (calibration->is_finished())
{
......@@ -302,6 +309,9 @@ bool Guide::do_pulse( GuideDirection ra_dir, int ra_msecs, GuideDirection dec_di
if (ST4Driver == NULL)
return false;
if (calibration->is_calibrating())
QTimer::singleShot( (ra_msecs > dec_msecs ? ra_msecs : dec_msecs) + 100, this, SLOT(capture()));
return ST4Driver->doPulse(ra_dir, ra_msecs, dec_dir, dec_msecs);
}
......@@ -310,6 +320,9 @@ bool Guide::do_pulse( GuideDirection dir, int msecs )
if (ST4Driver == NULL)
return false;
if (calibration->is_calibrating())
QTimer::singleShot(msecs+100, this, SLOT(capture()));
return ST4Driver->doPulse(dir, msecs);
}
......
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