Commit 36c6899a authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Use a timer to check if guiding deviation are still not resolved after 1...

Use a timer to check if guiding deviation are still not resolved after 1 minute. If that happens then complete abort of the sequence occurs
parent 8d5cca1e
......@@ -44,6 +44,7 @@
#define INVALID_TEMPERATURE 10000
#define INVALID_HA 10000
#define MF_TIMER_TIMEOUT 90000
#define GD_TIMER_TIMEOUT 60000
#define MF_RA_DIFF_LIMIT 4
#define MAX_CAPTURE_RETRIES 3
......@@ -129,6 +130,8 @@ Capture::Capture()
connect(CCDCaptureCombo, SIGNAL(activated(QString)), this, SLOT(setDefaultCCD(QString)));
connect(CCDCaptureCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(checkCCD(int)));
guideDeviationTimer.setInterval(GD_TIMER_TIMEOUT);
connect(&guideDeviationTimer, SIGNAL(timeout()), this, SLOT(checkGuideDeviationTimeout()));
connect(FilterCaptureCombo, SIGNAL(activated(int)), this, SLOT(checkFilter(int)));
......@@ -1932,6 +1935,7 @@ void Capture::setGuideDeviation(double delta_ra, double delta_dec)
deviationDetected = true;
appendLogText(i18n("Guiding deviation %1 exceeded limit value of %2 arcsecs, aborting exposure.", deviationText, guideDeviation->value()));
abort();
guideDeviationTimer.start();
}
return;
}
......@@ -1940,6 +1944,8 @@ void Capture::setGuideDeviation(double delta_ra, double delta_dec)
{
if (deviation_rms <= guideDeviation->value())
{
guideDeviationTimer.stop();
if (seqDelay == 0)
appendLogText(i18n("Guiding deviation %1 is now lower than limit value of %2 arcsecs, resuming exposure.", deviationText, guideDeviation->value()));
else
......@@ -3011,6 +3017,16 @@ void Capture::checkMeridianFlipTimeout()
}
}
void Capture::checkGuideDeviationTimeout()
{
if (activeJob && activeJob->getStatus() == SequenceJob::JOB_ABORTED && deviationDetected)
{
appendLogText(i18n("Guide module timed out."));
deviationDetected=false;
}
}
void Capture::setAlignStatus(AlignState state)
{
alignState = state;
......
......@@ -56,7 +56,7 @@ class KDirWatch;
* The primary class is EkosManager. It handles startup and shutdown of local and remote INDI devices, manages and orchesterates the various Ekos modules, and provides advanced DBus
* interface to enable unattended scripting.
*@author Jasem Mutlaq
*@version 1.3
*@version 1.4
*/
namespace Ekos
{
......@@ -71,7 +71,7 @@ class SequenceJob;
* is exceeded, it automatically trigger autofocus operation. The capture process can also be linked with guide module. If guiding deviations exceed a certain threshold, the capture operation aborts until
* the guiding deviation resume to acceptable levels and the capture operation is resumed.
*@author Jasem Mutlaq
*@version 1.2
*@version 1.3
*/
class Capture : public QWidget, public Ui::Capture
{
......@@ -177,17 +177,17 @@ public:
/** DBUS interface function.
* @return Returns the percentage of completed captures in all active jobs
*/
Q_SCRIPTABLE double getProgressPercentage();
Q_SCRIPTABLE double getProgressPercentage();
/** DBUS interface function.
* @return Returns the number of jobs in the sequence queue.
*/
Q_SCRIPTABLE int getJobCount() { return jobs.count(); }
Q_SCRIPTABLE int getJobCount() { return jobs.count(); }
/** DBUS interface function.
* @return Returns ID of current active job if any, or -1 if there are no active jobs.
*/
Q_SCRIPTABLE int getActiveJobID();
Q_SCRIPTABLE int getActiveJobID();
/** DBUS interface function.
* @return Returns time left in seconds until active job is estimated to be complete.
......@@ -418,6 +418,9 @@ private slots:
void checkMeridianFlipTimeout();
//void checkAlignmentSlewComplete();
// AutoGuide
void checkGuideDeviationTimeout();
// Auto Focus
//void updateAutofocusStatus(bool status, double HFR);
void startPostFilterAutoFocus();
......@@ -518,6 +521,7 @@ private:
// Guide Deviation
bool deviationDetected;
bool spikeDetected;
QTimer guideDeviationTimer;
// Autofocus
bool isAutoFocus;
......@@ -534,9 +538,6 @@ private:
MFStage meridianFlipStage;
// Flat field automation
/*double ExpRaw1, ExpRaw2;
double ADURaw1, ADURaw2;
double ADUSlope;*/
QList<double> ExpRaw;
QList<double> ADURaw;
double targetADU;
......
Supports Markdown
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