Index: kstars/ekos/capture/capture.h =================================================================== --- kstars/ekos/capture/capture.h +++ kstars/ekos/capture/capture.h @@ -599,12 +599,18 @@ void startRefocusTimer(bool forced = false); /* Capture */ - double seqExpose { 0 }; - QMap totalFramesCountMap; + + /** + * @brief Determine the overall number of target frames with the same signature. + * Assume capturing RGBLRGB, where in each sequence job there is only one frame. + * For "L" the result will be 1, for "R" it will be 2 etc. + * @param frame signature (typically the filter name) + * @return + */ int getTotalFramesCount(QString signature); - int seqTotalCount; - void updateTotalFramesCounts(); + double seqExpose { 0 }; + int seqTotalCount; int seqCurrentCount { 0 }; int seqDelay { 0 }; int retries { 0 }; Index: kstars/ekos/capture/capture.cpp =================================================================== --- kstars/ekos/capture/capture.cpp +++ kstars/ekos/capture/capture.cpp @@ -431,8 +431,6 @@ if (autofocusCheck->isChecked() && autoFocusReady == false) appendLogText(i18n("Warning: in-sequence focusing is selected but autofocus process was not started.")); - updateTotalFramesCounts(); - prepareJob(first_job); } @@ -1303,7 +1301,7 @@ } // If seqTotalCount is zero, we have to find if there are more pending jobs in the queue - if (seqTotalCount <= 0) + if (seqTotalCount == 0) { SequenceJob *next_job = nullptr; @@ -2286,7 +2284,7 @@ // Fully complete if (seqFileCount >= getTotalFramesCount(signature)) { - activeJob->setCompleted(getTotalFramesCount(signature)); + activeJob->setCompleted(seqFileCount); imgProgress->setValue(getTotalFramesCount(signature)); qCDebug(KSTARS_EKOS_CAPTURE) << "Job" << job->getFullPrefix() << "already complete."; processJobCompletion(); @@ -2737,25 +2735,25 @@ HFRPixels->setValue(median + (median * (Options::hFRThresholdPercentage() / 100.0))); } -void Capture::updateTotalFramesCounts() +int Capture::getTotalFramesCount(QString signature) { - totalFramesCountMap.clear(); + + int result = 0; + bool found = false; foreach (SequenceJob *job, jobs) { // FIXME: this should be part of SequenceJob QString sig = job->getSignature(); - if (! totalFramesCountMap.contains(sig)) - totalFramesCountMap[sig] = job->getCount(); - else - totalFramesCountMap[sig] += job->getCount(); + if (sig == signature) + { + result += job->getCount(); + found = true; + } } -} -int Capture::getTotalFramesCount(QString signature) -{ - if (totalFramesCountMap.contains(signature)) - return totalFramesCountMap.value(signature); + if (found) + return result; else return -1; }