Index: kstars/ekos/capture/capture.cpp =================================================================== --- kstars/ekos/capture/capture.cpp +++ kstars/ekos/capture/capture.cpp @@ -2318,7 +2318,7 @@ // Now let's consider something went wrong, and the third job was aborted before getting to 60 images, say we have full LRG, but only 1xB. // When Scheduler attempts to run the aborted job again, it will count captures in storage, substract previous job requirements, and set the frames map counters to 0 for LRG, and 4 for B. // When the sequence runs, the procedure will bypass LRG and proceed to capture 4xB. - if (!ignoreJobProgress && capturedFramesMap.contains(signature)) + if (capturedFramesMap.contains(signature)) { // Get the current capture count from the map int count = capturedFramesMap[signature]; Index: kstars/ekos/scheduler/scheduler.cpp =================================================================== --- kstars/ekos/scheduler/scheduler.cpp +++ kstars/ekos/scheduler/scheduler.cpp @@ -4337,24 +4337,29 @@ dbusargs.append(url); captureInterface->callWithArgumentList(QDBus::AutoDetect, "loadSequenceQueue", dbusargs); - SchedulerJob::CapturedFramesMap fMap = currentJob->getCapturedFramesMap(); + if (currentJob->getCompletionCondition() != SchedulerJob::FINISH_LOOP) { + // In case of repeating until terminated, we leave the captured frames map empty + // to ensure, that the capture sequence is executed in any case. + SchedulerJob::CapturedFramesMap fMap = currentJob->getCapturedFramesMap(); - for (auto &e : fMap.keys()) - { - QList dbusargs; - QDBusMessage reply; - - dbusargs.append(e); - dbusargs.append(fMap.value(e)); - if ((reply = captureInterface->callWithArgumentList(QDBus::AutoDetect, "setCapturedFramesMap", dbusargs)).type() == - QDBusMessage::ErrorMessage) + for (auto &e : fMap.keys()) { - qCCritical(KSTARS_EKOS_SCHEDULER) << QString("Warning: job '%1' setCapturedFramesCount request received DBUS error: %1").arg(currentJob->getName(), reply.errorMessage()); - return; + QList dbusargs; + QDBusMessage reply; + + dbusargs.append(e); + dbusargs.append(fMap.value(e)); + if ((reply = captureInterface->callWithArgumentList(QDBus::AutoDetect, "setCapturedFramesMap", dbusargs)).type() == + QDBusMessage::ErrorMessage) + { + qCCritical(KSTARS_EKOS_SCHEDULER) << QString("Warning: job '%1' setCapturedFramesCount request received DBUS error: %1").arg(currentJob->getName(), reply.errorMessage()); + return; + } } } // If sequence is a loop, ignore sequence history + // FIXME: set, but never used. if (currentJob->getCompletionCondition() != SchedulerJob::FINISH_SEQUENCE) captureInterface->call(QDBus::AutoDetect, "ignoreSequenceHistory");