Using my dual QHY script I am classifying your fix version as GOOD - I am rattlinng off dual shots with no issues - logging to window is good - one interesting and GOOD side effect of your code is the second camera images now pop up in fits viewer as "preview" - with my original it was the file name - does not matter as preview is fine -
I can test dither, focus and flip If I get clear skies but knowing how this works I see no issue
how about re change name to capture script - what I found in existing code is the pre-job and pre-capture both fire only once and before the sequence starts - the POST capture will fire after every capture and post job at the end of the sequence so whatever was the intent of pre-capture it was not doing what it needed to do since pre-job did the same thing...I am happy to keep this private but it does allow all the dual imagers to properly sequence jobs :-)
Hmmm...directly below is the trigger of the capture - perhaps 1 must trigger first before this? - my experinces have been that the script and main cam fire at same time and finish at same time - took me a while to find that point
case SequenceJob::CAPTURE_OK: { //Jamie - this is the actual start of capture - pre-capture script needs to be executed here // trigger the pre_capture script right before actual capture const QString preCaptureScript = activeJob->getScript(SCRIPT_PRE_CAPTURE); if (!preCaptureScript.isEmpty()) { m_CaptureScriptType = SCRIPT_PRE_CAPTURE; m_CaptureScript.start(preCaptureScript, generateScriptArguments()); appendLogText(i18n("Executing Pre-Caputre script in Fire and Forget mode - no check on status : %v3.4.3", preCaptureScript));
}
emit captureStarting(activeJob->getExposure(), activeJob->getFilterName());
appendLogText(i18n("Capturing %1-second %2 image...", QString("%L1").arg(activeJob->getExposure(), 0, 'f', 3),
activeJob->getFilterName()));
captureTimeout.start(static_cast<int>(activeJob->getExposure()) * 1000 + CAPTURE_TIMEOUT_THRESHOLD);
if (activeJob->isPreview() == false)
{
int index = jobs.indexOf(activeJob);
QJsonObject oneSequence = m_SequenceArray[index].toObject();
oneSequence["Status"] = "In Progress";
m_SequenceArray.replace(index, oneSequence);
emit sequenceChanged(m_SequenceArray);
}
}
Fix for position of pre-capture script - original code was treating pre-capture like pre-job and executing only one time - 3 spots in code move the script trigger to the needed location as executed each time a capture is executed - this synchonizes the script with all activity inlcuding dither, align and filter changes on the MAIN camera - it also allows for use of any number of camera that INDI can support by using the indi_setprop command in script format - this has been tested for months now on version of KStars from 3.5.2 through 3.5.5 beta
sample script #!/bin/bash echo "2nd Camera is about to take a picture" #indi_getprop indi_setprop -h 127.0.0.1 "QHY CCD QHY294PROC-4e75.CCD_EXPOSURE.CCD_EXPOSURE_VALUE=300" echo "2nd Camera execution command sent" exit 0
Jamie Flinn (f0858ff7) at 27 Aug 17:01
Update kstars/ekos/capture/capture.cpp