diff --git a/kstars/ekos/scheduler/scheduler.cpp b/kstars/ekos/scheduler/scheduler.cpp --- a/kstars/ekos/scheduler/scheduler.cpp +++ b/kstars/ekos/scheduler/scheduler.cpp @@ -2894,6 +2894,7 @@ if (startupScriptURL.isEmpty() == false) appendLogText(i18n("Ekos is already started, skipping startup script...")); + /* Only unpark the dome if light frames are required, calibration frames can run whenever needed */ if (currentJob->getLightFramesRequired()) startupState = STARTUP_UNPARK_DOME; else @@ -3848,26 +3849,16 @@ switch (currentJob->getStage()) { case SchedulerJob::STAGE_IDLE: - if (currentJob->getLightFramesRequired()) - { - if (currentJob->getStepPipeline() & SchedulerJob::USE_TRACK) - startSlew(); - else if (currentJob->getStepPipeline() & SchedulerJob::USE_FOCUS && autofocusCompleted == false) - startFocusing(); - else if (currentJob->getStepPipeline() & SchedulerJob::USE_ALIGN) - startAstrometry(); - else if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) - startGuiding(); - else - startCapture(); - } + if (currentJob->getStepPipeline() & SchedulerJob::USE_TRACK) + startSlew(); + else if (currentJob->getStepPipeline() & SchedulerJob::USE_FOCUS && autofocusCompleted == false) + startFocusing(); + else if (currentJob->getStepPipeline() & SchedulerJob::USE_ALIGN) + startAstrometry(); + else if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) + startGuiding(); else - { - if (currentJob->getStepPipeline()) - appendLogText( - i18n("Job '%1' is proceeding directly to capture stage because only calibration frames are pending.", currentJob->getName())); startCapture(); - } break; @@ -5315,23 +5306,20 @@ // Else consolidate with step durations else { - if (schedJob->getLightFramesRequired()) - { - /* FIXME: estimation doesn't need to consider repeats, those will be optimized away by findNextJob (this is a regression) */ - /* FIXME: estimation should base on actual measure of each step, eventually with preliminary data as what it used now */ - // Are we doing tracking? It takes about 30 seconds - if (schedJob->getStepPipeline() & SchedulerJob::USE_TRACK) - totalImagingTime += 30 * schedJob->getRepeatsRequired(); - // Are we doing initial focusing? That can take about 2 minutes - if (schedJob->getStepPipeline() & SchedulerJob::USE_FOCUS) - totalImagingTime += 120 * schedJob->getRepeatsRequired(); - // Are we doing astrometry? That can take about 30 seconds - if (schedJob->getStepPipeline() & SchedulerJob::USE_ALIGN) - totalImagingTime += 30 * schedJob->getRepeatsRequired(); - // Are we doing guiding? Calibration process can take about 2 mins - if (schedJob->getStepPipeline() & SchedulerJob::USE_GUIDE) - totalImagingTime += 120 * schedJob->getRepeatsRequired(); - } + /* FIXME: estimation doesn't need to consider repeats, those will be optimized away by findNextJob (this is a regression) */ + /* FIXME: estimation should base on actual measure of each step, eventually with preliminary data as what it used now */ + // Are we doing tracking? It takes about 30 seconds + if (schedJob->getStepPipeline() & SchedulerJob::USE_TRACK) + totalImagingTime += 30 * schedJob->getRepeatsRequired(); + // Are we doing initial focusing? That can take about 2 minutes + if (schedJob->getStepPipeline() & SchedulerJob::USE_FOCUS) + totalImagingTime += 120 * schedJob->getRepeatsRequired(); + // Are we doing astrometry? That can take about 30 seconds + if (schedJob->getStepPipeline() & SchedulerJob::USE_ALIGN) + totalImagingTime += 30 * schedJob->getRepeatsRequired(); + // Are we doing guiding? Calibration process can take about 2 mins + if (schedJob->getStepPipeline() & SchedulerJob::USE_GUIDE) + totalImagingTime += 120 * schedJob->getRepeatsRequired(); dms const estimatedTime(totalImagingTime * 15.0 / 3600.0); schedJob->setEstimatedTime(totalImagingTime); @@ -7171,6 +7159,7 @@ bool Scheduler::shouldSchedulerSleep(SchedulerJob *currentJob) { + /* Only sleep if light frames are required, calibration frames can run whenever needed */ if (currentJob->getLightFramesRequired() == false) return false;