Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/capture/capture.cpp
Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Line(s) | 51 | { | |||
---|---|---|---|---|---|
237 | 237 | | |||
238 | // 4. Autofocus HFR Deviation | 238 | // 4. Autofocus HFR Deviation | ||
239 | HFRPixels->setValue(Options::hFRDeviation()); | 239 | HFRPixels->setValue(Options::hFRDeviation()); | ||
240 | connect(HFRPixels, &QDoubleSpinBox::editingFinished, [ = ]() | 240 | connect(HFRPixels, &QDoubleSpinBox::editingFinished, [ = ]() | ||
241 | { | 241 | { | ||
242 | Options::setHFRDeviation(HFRPixels->value()); | 242 | Options::setHFRDeviation(HFRPixels->value()); | ||
243 | }); | 243 | }); | ||
244 | 244 | | |||
245 | // 5. Refocus Every Check | 245 | // 5. Autofocus temperature Check | ||
246 | temperatureDeltaCheck->setChecked(Options::enforceAutofocusOnTemperature()); | ||||
247 | connect(temperatureDeltaCheck, &QCheckBox::toggled, [ = ](bool checked) | ||||
248 | { | ||||
249 | Options::setEnforceAutofocusOnTemperature(checked); | ||||
250 | if (checked == false) | ||||
251 | isTemperatureDeltaCheckActive = false; | ||||
252 | }); | ||||
253 | | ||||
254 | // 6. Autofocus temperature Delta | ||||
255 | temperatureDelta->setValue(Options::maxFocusTemperatureDelta()); | ||||
256 | connect(temperatureDelta, &QDoubleSpinBox::editingFinished, [ = ]() | ||||
257 | { | ||||
258 | Options::setMaxFocusTemperatureDelta(temperatureDelta->value()); | ||||
259 | }); | ||||
260 | | ||||
261 | // 7. Refocus Every Check | ||||
246 | refocusEveryNCheck->setChecked(Options::enforceRefocusEveryN()); | 262 | refocusEveryNCheck->setChecked(Options::enforceRefocusEveryN()); | ||
247 | connect(refocusEveryNCheck, &QCheckBox::toggled, [ = ](bool checked) | 263 | connect(refocusEveryNCheck, &QCheckBox::toggled, [ = ](bool checked) | ||
248 | { | 264 | { | ||
249 | Options::setEnforceRefocusEveryN(checked); | 265 | Options::setEnforceRefocusEveryN(checked); | ||
250 | }); | 266 | }); | ||
251 | 267 | | |||
252 | // 6. Refocus Every Value | 268 | // 8. Refocus Every Value | ||
253 | refocusEveryN->setValue(Options::refocusEveryN()); | 269 | refocusEveryN->setValue(Options::refocusEveryN()); | ||
254 | connect(refocusEveryN, &QDoubleSpinBox::editingFinished, [ = ]() | 270 | connect(refocusEveryN, &QDoubleSpinBox::editingFinished, [ = ]() | ||
255 | { | 271 | { | ||
256 | Options::setRefocusEveryN(refocusEveryN->value()); | 272 | Options::setRefocusEveryN(refocusEveryN->value()); | ||
257 | }); | 273 | }); | ||
258 | 274 | | |||
259 | // 7. File settings: filter name | 275 | // 9. File settings: filter name | ||
260 | filterCheck->setChecked(Options::fileSettingsUseFilter()); | 276 | filterCheck->setChecked(Options::fileSettingsUseFilter()); | ||
261 | connect(filterCheck, &QCheckBox::toggled, [ = ](bool checked) | 277 | connect(filterCheck, &QCheckBox::toggled, [ = ](bool checked) | ||
262 | { | 278 | { | ||
263 | Options::setFileSettingsUseFilter(checked); | 279 | Options::setFileSettingsUseFilter(checked); | ||
264 | }); | 280 | }); | ||
265 | 281 | | |||
266 | // 8. File settings: duration | 282 | // 10. File settings: duration | ||
267 | expDurationCheck->setChecked(Options::fileSettingsUseDuration()); | 283 | expDurationCheck->setChecked(Options::fileSettingsUseDuration()); | ||
268 | connect(expDurationCheck, &QCheckBox::toggled, [ = ](bool checked) | 284 | connect(expDurationCheck, &QCheckBox::toggled, [ = ](bool checked) | ||
269 | { | 285 | { | ||
270 | Options::setFileSettingsUseDuration(checked); | 286 | Options::setFileSettingsUseDuration(checked); | ||
271 | }); | 287 | }); | ||
272 | 288 | | |||
273 | // 9. File settings: timestamp | 289 | // 11. File settings: timestamp | ||
274 | ISOCheck->setChecked(Options::fileSettingsUseTimestamp()); | 290 | ISOCheck->setChecked(Options::fileSettingsUseTimestamp()); | ||
275 | connect(ISOCheck, &QCheckBox::toggled, [ = ](bool checked) | 291 | connect(ISOCheck, &QCheckBox::toggled, [ = ](bool checked) | ||
276 | { | 292 | { | ||
277 | Options::setFileSettingsUseTimestamp(checked); | 293 | Options::setFileSettingsUseTimestamp(checked); | ||
278 | }); | 294 | }); | ||
279 | 295 | | |||
280 | QCheckBox * const checkBoxes[] = | 296 | QCheckBox * const checkBoxes[] = | ||
281 | { | 297 | { | ||
282 | guideDeviationCheck, | 298 | guideDeviationCheck, | ||
283 | refocusEveryNCheck, | 299 | refocusEveryNCheck, | ||
284 | guideDeviationCheck, | 300 | guideDeviationCheck, | ||
285 | }; | 301 | }; | ||
286 | for (const QCheckBox * control : checkBoxes) | 302 | for (const QCheckBox * control : checkBoxes) | ||
287 | connect(control, &QCheckBox::toggled, this, &Ekos::Capture::setDirty); | 303 | connect(control, &QCheckBox::toggled, this, &Ekos::Capture::setDirty); | ||
288 | 304 | | |||
289 | QDoubleSpinBox * const dspinBoxes[] | 305 | QDoubleSpinBox * const dspinBoxes[] | ||
290 | { | 306 | { | ||
291 | HFRPixels, | 307 | HFRPixels, | ||
308 | temperatureDelta, | ||||
292 | guideDeviation, | 309 | guideDeviation, | ||
293 | }; | 310 | }; | ||
294 | for (const QDoubleSpinBox * control : dspinBoxes) | 311 | for (const QDoubleSpinBox * control : dspinBoxes) | ||
295 | connect(control, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), this, | 312 | connect(control, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), this, | ||
296 | &Ekos::Capture::setDirty); | 313 | &Ekos::Capture::setDirty); | ||
297 | 314 | | |||
298 | connect(uploadModeCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &Ekos::Capture::setDirty); | 315 | connect(uploadModeCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &Ekos::Capture::setDirty); | ||
299 | connect(remoteDirIN, &QLineEdit::editingFinished, this, &Ekos::Capture::setDirty); | 316 | connect(remoteDirIN, &QLineEdit::editingFinished, this, &Ekos::Capture::setDirty); | ||
▲ Show 20 Lines • Show All 305 Lines • ▼ Show 20 Line(s) | 534 | { | |||
605 | pauseB->setEnabled(true); | 622 | pauseB->setEnabled(true); | ||
606 | 623 | | |||
607 | setBusy(true); | 624 | setBusy(true); | ||
608 | 625 | | |||
609 | if (guideDeviationCheck->isChecked() && autoGuideReady == false) | 626 | if (guideDeviationCheck->isChecked() && autoGuideReady == false) | ||
610 | appendLogText(i18n("Warning: Guide deviation is selected but autoguide process was not started.")); | 627 | appendLogText(i18n("Warning: Guide deviation is selected but autoguide process was not started.")); | ||
611 | if (autofocusCheck->isChecked() && m_AutoFocusReady == false) | 628 | if (autofocusCheck->isChecked() && m_AutoFocusReady == false) | ||
612 | appendLogText(i18n("Warning: in-sequence focusing is selected but autofocus process was not started.")); | 629 | appendLogText(i18n("Warning: in-sequence focusing is selected but autofocus process was not started.")); | ||
613 | 630 | if (temperatureDeltaCheck->isChecked() && m_AutoFocusReady == false) | |||
631 | appendLogText(i18n("Warning: temperature delta check is selected but autofocus process was not started.")); | ||||
614 | prepareJob(first_job); | 632 | prepareJob(first_job); | ||
615 | } | 633 | } | ||
616 | 634 | | |||
617 | void Capture::stop(CaptureState targetState) | 635 | void Capture::stop(CaptureState targetState) | ||
618 | { | 636 | { | ||
619 | retries = 0; | 637 | retries = 0; | ||
620 | //seqTotalCount = 0; | 638 | //seqTotalCount = 0; | ||
621 | //seqCurrentCount = 0; | 639 | //seqCurrentCount = 0; | ||
▲ Show 20 Lines • Show All 1134 Lines • ▼ Show 20 Line(s) | 1744 | { | |||
1756 | } | 1774 | } | ||
1757 | } | 1775 | } | ||
1758 | // Otherwise, let's prepare for next exposure after making sure in-sequence focus and dithering are complete if applicable. | 1776 | // Otherwise, let's prepare for next exposure after making sure in-sequence focus and dithering are complete if applicable. | ||
1759 | else | 1777 | else | ||
1760 | { | 1778 | { | ||
1761 | isInSequenceFocus = (m_AutoFocusReady && autofocusCheck->isChecked()/* && HFRPixels->value() > 0*/); | 1779 | isInSequenceFocus = (m_AutoFocusReady && autofocusCheck->isChecked()/* && HFRPixels->value() > 0*/); | ||
1762 | // if (isInSequenceFocus) | 1780 | // if (isInSequenceFocus) | ||
1763 | // requiredAutoFocusStarted = false; | 1781 | // requiredAutoFocusStarted = false; | ||
1782 | isTemperatureDeltaCheckActive = (m_AutoFocusReady && temperatureDeltaCheck->isChecked()); | ||||
1764 | 1783 | | |||
1765 | // Reset HFR pixels to file value after meridian flip | 1784 | // Reset HFR pixels to file value after meridian flip | ||
1766 | if (isInSequenceFocus && meridianFlipStage != MF_NONE && meridianFlipStage != MF_READY) | 1785 | if (isInSequenceFocus && meridianFlipStage != MF_NONE && meridianFlipStage != MF_READY) | ||
1767 | { | 1786 | { | ||
1768 | qCDebug(KSTARS_EKOS_CAPTURE) << "Resetting HFR value to file value of" << fileHFR << "pixels after meridian flip."; | 1787 | qCDebug(KSTARS_EKOS_CAPTURE) << "Resetting HFR value to file value of" << fileHFR << "pixels after meridian flip."; | ||
1769 | //firstAutoFocus = true; | 1788 | //firstAutoFocus = true; | ||
1770 | HFRPixels->setValue(fileHFR); | 1789 | HFRPixels->setValue(fileHFR); | ||
1771 | } | 1790 | } | ||
▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Line(s) | 1882 | #endif | |||
1881 | return true; | 1900 | return true; | ||
1882 | } | 1901 | } | ||
1883 | 1902 | | |||
1884 | bool Capture::startFocusIfRequired() | 1903 | bool Capture::startFocusIfRequired() | ||
1885 | { | 1904 | { | ||
1886 | if (activeJob == nullptr || activeJob->getFrameType() != FRAME_LIGHT) | 1905 | if (activeJob == nullptr || activeJob->getFrameType() != FRAME_LIGHT) | ||
1887 | return false; | 1906 | return false; | ||
1888 | 1907 | | |||
1908 | isRefocus = false; | ||||
1909 | | ||||
1889 | // check if time for forced refocus | 1910 | // check if time for forced refocus | ||
1890 | if (refocusEveryNCheck->isChecked()) | 1911 | if (refocusEveryNCheck->isChecked()) | ||
1891 | { | 1912 | { | ||
1892 | qCDebug(KSTARS_EKOS_CAPTURE) << "Focus elapsed time (secs): " << getRefocusEveryNTimerElapsedSec() << | 1913 | qCDebug(KSTARS_EKOS_CAPTURE) << "Focus elapsed time (secs): " << getRefocusEveryNTimerElapsedSec() << | ||
1893 | ". Requested Interval (secs): " << refocusEveryN->value() * 60; | 1914 | ". Requested Interval (secs): " << refocusEveryN->value() * 60; | ||
1894 | isRefocus = getRefocusEveryNTimerElapsedSec() >= refocusEveryN->value() * 60; | | |||
1895 | } | | |||
1896 | else | | |||
1897 | isRefocus = false; | | |||
1898 | 1915 | | |||
1899 | if (isRefocus) | 1916 | if (getRefocusEveryNTimerElapsedSec() >= refocusEveryN->value() * 60) | ||
1900 | { | 1917 | { | ||
1918 | isRefocus = true; | ||||
1901 | appendLogText(i18n("Scheduled refocus starting after %1 seconds...", getRefocusEveryNTimerElapsedSec())); | 1919 | appendLogText(i18n("Scheduled refocus starting after %1 seconds...", getRefocusEveryNTimerElapsedSec())); | ||
1920 | } | ||||
1921 | } | ||||
1922 | | ||||
1923 | if (!isRefocus && isTemperatureDeltaCheckActive) | ||||
1924 | { | ||||
1925 | qCDebug(KSTARS_EKOS_CAPTURE) << "Focus temperature delta (°C): " << focusTemperatureDelta << | ||||
1926 | ". Requested maximum delta (°C): " << temperatureDelta->value(); | ||||
1927 | | ||||
1928 | if (focusTemperatureDelta > temperatureDelta->value()) | ||||
1929 | { | ||||
1930 | isRefocus = true; | ||||
1931 | appendLogText(i18n("Refocus starting because of temperature change of %1 °C...", focusTemperatureDelta)); | ||||
1932 | } | ||||
1933 | } | ||||
1902 | 1934 | | |||
1935 | // Either it is time to force autofocus or temperature has changed | ||||
1936 | if (isRefocus) | ||||
1937 | { | ||||
1903 | secondsLabel->setText(i18n("Focusing...")); | 1938 | secondsLabel->setText(i18n("Focusing...")); | ||
1904 | 1939 | | |||
1905 | if (currentCCD->isLooping()) | 1940 | if (currentCCD->isLooping()) | ||
1906 | targetChip->abortExposure(); | 1941 | targetChip->abortExposure(); | ||
1907 | 1942 | | |||
1908 | // If we are over 30 mins since last autofocus, we'll reset frame. | 1943 | // If we are over 30 mins since last autofocus, we'll reset frame. | ||
1909 | if (refocusEveryN->value() >= 30) | 1944 | if (refocusEveryN->value() >= 30) | ||
1910 | emit resetFocus(); | 1945 | emit resetFocus(); | ||
1911 | 1946 | | |||
1912 | // force refocus | 1947 | // force refocus | ||
1913 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 1904."; | 1948 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line " << __LINE__; | ||
TallFurryMan: Good spot, wouldn't `__LINE__` solve this problem? :) | |||||
1914 | emit checkFocus(0.1); | 1949 | emit checkFocus(0.1); | ||
1915 | 1950 | | |||
1916 | m_State = CAPTURE_FOCUSING; | 1951 | m_State = CAPTURE_FOCUSING; | ||
1917 | emit newStatus(Ekos::CAPTURE_FOCUSING); | 1952 | emit newStatus(Ekos::CAPTURE_FOCUSING); | ||
1918 | return true; | 1953 | return true; | ||
1919 | } | 1954 | } | ||
1920 | else if (isInSequenceFocus && inSequenceFocusCounter == 0) | 1955 | else if (isInSequenceFocus && inSequenceFocusCounter == 0) | ||
1921 | { | 1956 | { | ||
Yes, there was an else after a if-then-return, but with big blocks of code like this, it is probably better to consider the if addresses isRefocus, isInSequenceFocus and inSequenceFocusCounter as a set of three related flags, instead of the things that happen in those blocks. So please keep the else for clarity, so that others understand? (minor) TallFurryMan: Yes, there was an `else` after a `if-then-return`, but with big blocks of code like this, it is… | |||||
1922 | inSequenceFocusCounter = Options::inSequenceCheckFrames(); | 1957 | inSequenceFocusCounter = Options::inSequenceCheckFrames(); | ||
1923 | 1958 | | |||
1924 | // Post meridian flip we need to reset filter _before_ running in-sequence focusing | 1959 | // Post meridian flip we need to reset filter _before_ running in-sequence focusing | ||
1925 | // as it could have changed for whatever reason (e.g. alignment used a different filter). | 1960 | // as it could have changed for whatever reason (e.g. alignment used a different filter). | ||
1926 | // Then when focus process begins with the _target_ filter in place, it should take all the necessary actions to make it | 1961 | // Then when focus process begins with the _target_ filter in place, it should take all the necessary actions to make it | ||
1927 | // work for the next set of captures. This is direct reset to the filter device, not via Filter Manager. | 1962 | // work for the next set of captures. This is direct reset to the filter device, not via Filter Manager. | ||
1928 | if (meridianFlipStage != MF_NONE && currentFilter) | 1963 | if (meridianFlipStage != MF_NONE && currentFilter) | ||
1929 | { | 1964 | { | ||
1930 | int targetFilterPosition = activeJob->getTargetFilter(); | 1965 | int targetFilterPosition = activeJob->getTargetFilter(); | ||
1931 | int currentFilterPosition = filterManager->getFilterPosition(); | 1966 | int currentFilterPosition = filterManager->getFilterPosition(); | ||
1932 | if (targetFilterPosition > 0 && targetFilterPosition != currentFilterPosition) | 1967 | if (targetFilterPosition > 0 && targetFilterPosition != currentFilterPosition) | ||
1933 | currentFilter->runCommand(INDI_SET_FILTER, &targetFilterPosition); | 1968 | currentFilter->runCommand(INDI_SET_FILTER, &targetFilterPosition); | ||
1934 | } | 1969 | } | ||
1935 | 1970 | | |||
1936 | secondsLabel->setText(i18n("Focusing...")); | 1971 | secondsLabel->setText(i18n("Focusing...")); | ||
1937 | 1972 | | |||
1938 | if (currentCCD->isLooping()) | 1973 | if (currentCCD->isLooping()) | ||
1939 | targetChip->abortExposure(); | 1974 | targetChip->abortExposure(); | ||
1940 | 1975 | | |||
1941 | if (HFRPixels->value() == 0) | 1976 | if (HFRPixels->value() == 0) | ||
1942 | { | 1977 | { | ||
1943 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 1934."; | 1978 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line " << __LINE__; | ||
1944 | emit checkFocus(0.1); | 1979 | emit checkFocus(0.1); | ||
1945 | } | 1980 | } | ||
1946 | else | 1981 | else | ||
1947 | { | 1982 | { | ||
1948 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 1939."; | 1983 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line " << __LINE__; | ||
1949 | emit checkFocus(HFRPixels->value()); | 1984 | emit checkFocus(HFRPixels->value()); | ||
1950 | } | 1985 | } | ||
1951 | 1986 | | |||
1952 | qCDebug(KSTARS_EKOS_CAPTURE) << "In-sequence focusing started..."; | 1987 | qCDebug(KSTARS_EKOS_CAPTURE) << "In-sequence focusing started..."; | ||
1953 | 1988 | | |||
1954 | m_State = CAPTURE_FOCUSING; | 1989 | m_State = CAPTURE_FOCUSING; | ||
1955 | emit newStatus(Ekos::CAPTURE_FOCUSING); | 1990 | emit newStatus(Ekos::CAPTURE_FOCUSING); | ||
1956 | return true; | 1991 | return true; | ||
▲ Show 20 Lines • Show All 1275 Lines • ▼ Show 20 Line(s) | 3266 | if ((meridianFlipStage == MF_NONE || meridianFlipStage == MF_READY) && m_State != CAPTURE_FOCUSING) | |||
3232 | secondsLabel->clear(); | 3267 | secondsLabel->clear(); | ||
3233 | QTimer::singleShot(1000, this, &Ekos::Capture::updatePreCaptureCalibrationStatus); | 3268 | QTimer::singleShot(1000, this, &Ekos::Capture::updatePreCaptureCalibrationStatus); | ||
3234 | return; | 3269 | return; | ||
3235 | } | 3270 | } | ||
3236 | 3271 | | |||
3237 | captureImage(); | 3272 | captureImage(); | ||
3238 | } | 3273 | } | ||
3239 | 3274 | | |||
3275 | void Capture::setFocusTemperatureDelta(double focusTemperatureDelta) | ||||
3276 | { | ||||
3277 | qCDebug(KSTARS_EKOS_CAPTURE) << "setFocusTemperatureDelta: " << focusTemperatureDelta; | ||||
3278 | this->focusTemperatureDelta = focusTemperatureDelta; | ||||
3279 | } | ||||
3280 | | ||||
3240 | void Capture::setGuideDeviation(double delta_ra, double delta_dec) | 3281 | void Capture::setGuideDeviation(double delta_ra, double delta_dec) | ||
3241 | { | 3282 | { | ||
3242 | // if (activeJob == nullptr) | 3283 | // if (activeJob == nullptr) | ||
3243 | // { | 3284 | // { | ||
3244 | // if (deviationDetected == false) | 3285 | // if (deviationDetected == false) | ||
3245 | // return; | 3286 | // return; | ||
3246 | 3287 | | |||
3247 | // // Try to find first job that was aborted due to deviation | 3288 | // // Try to find first job that was aborted due to deviation | ||
▲ Show 20 Lines • Show All 530 Lines • ▼ Show 20 Line(s) | 3808 | { | |||
3778 | { | 3819 | { | ||
3779 | autofocusCheck->setChecked(!strcmp(findXMLAttValu(ep, "enabled"), "true")); | 3820 | autofocusCheck->setChecked(!strcmp(findXMLAttValu(ep, "enabled"), "true")); | ||
3780 | double const HFRValue = cLocale.toDouble(pcdataXMLEle(ep)); | 3821 | double const HFRValue = cLocale.toDouble(pcdataXMLEle(ep)); | ||
3781 | // Set the HFR value from XML, or reset it to zero, don't let another unrelated older HFR be used | 3822 | // Set the HFR value from XML, or reset it to zero, don't let another unrelated older HFR be used | ||
3782 | // Note that HFR value will only be serialized to XML when option "Save Sequence HFR to File" is enabled | 3823 | // Note that HFR value will only be serialized to XML when option "Save Sequence HFR to File" is enabled | ||
3783 | fileHFR = HFRValue > 0.0 ? HFRValue : 0.0; | 3824 | fileHFR = HFRValue > 0.0 ? HFRValue : 0.0; | ||
3784 | HFRPixels->setValue(fileHFR); | 3825 | HFRPixels->setValue(fileHFR); | ||
3785 | } | 3826 | } | ||
3827 | else if (!strcmp(tagXMLEle(ep), "RefocusOnTemperatureDelta")) | ||||
3828 | { | ||||
3829 | temperatureDeltaCheck->setChecked(!strcmp(findXMLAttValu(ep, "enabled"), "true")); | ||||
3830 | double const deltaValue = cLocale.toDouble(pcdataXMLEle(ep)); | ||||
3831 | temperatureDelta->setValue(deltaValue); | ||||
3832 | } | ||||
3786 | else if (!strcmp(tagXMLEle(ep), "RefocusEveryN")) | 3833 | else if (!strcmp(tagXMLEle(ep), "RefocusEveryN")) | ||
3787 | { | 3834 | { | ||
3788 | refocusEveryNCheck->setChecked(!strcmp(findXMLAttValu(ep, "enabled"), "true")); | 3835 | refocusEveryNCheck->setChecked(!strcmp(findXMLAttValu(ep, "enabled"), "true")); | ||
3789 | int const minutesValue = cLocale.toInt(pcdataXMLEle(ep)); | 3836 | int const minutesValue = cLocale.toInt(pcdataXMLEle(ep)); | ||
3790 | // Set the refocus period from XML, or reset it to zero, don't let another unrelated older refocus period be used. | 3837 | // Set the refocus period from XML, or reset it to zero, don't let another unrelated older refocus period be used. | ||
3791 | refocusEveryNMinutesValue = minutesValue > 0 ? minutesValue : 0; | 3838 | refocusEveryNMinutesValue = minutesValue > 0 ? minutesValue : 0; | ||
3792 | refocusEveryN->setValue(refocusEveryNMinutesValue); | 3839 | refocusEveryN->setValue(refocusEveryNMinutesValue); | ||
3793 | } | 3840 | } | ||
▲ Show 20 Lines • Show All 348 Lines • ▼ Show 20 Line(s) | 4188 | outstream << "<GuideDeviation enabled='" << (guideDeviationCheck->isChecked() ? "true" : "false") << "'>" | |||
4142 | << cLocale.toString(guideDeviation->value()) << "</GuideDeviation>" << endl; | 4189 | << cLocale.toString(guideDeviation->value()) << "</GuideDeviation>" << endl; | ||
4143 | // Issue a warning when autofocus is enabled but Ekos options prevent HFR value from being written | 4190 | // Issue a warning when autofocus is enabled but Ekos options prevent HFR value from being written | ||
4144 | if (autofocusCheck->isChecked() && !Options::saveHFRToFile()) | 4191 | if (autofocusCheck->isChecked() && !Options::saveHFRToFile()) | ||
4145 | appendLogText(i18n( | 4192 | appendLogText(i18n( | ||
4146 | "Warning: HFR-based autofocus is set but option \"Save Sequence HFR Value to File\" is not enabled. " | 4193 | "Warning: HFR-based autofocus is set but option \"Save Sequence HFR Value to File\" is not enabled. " | ||
4147 | "Current HFR value will not be written to sequence file.")); | 4194 | "Current HFR value will not be written to sequence file.")); | ||
4148 | outstream << "<Autofocus enabled='" << (autofocusCheck->isChecked() ? "true" : "false") << "'>" | 4195 | outstream << "<Autofocus enabled='" << (autofocusCheck->isChecked() ? "true" : "false") << "'>" | ||
4149 | << cLocale.toString(Options::saveHFRToFile() ? HFRPixels->value() : 0) << "</Autofocus>" << endl; | 4196 | << cLocale.toString(Options::saveHFRToFile() ? HFRPixels->value() : 0) << "</Autofocus>" << endl; | ||
4197 | outstream << "<RefocusOnTemperatureDelta enabled='" << (temperatureDeltaCheck->isChecked() ? "true" : "false") << "'>" | ||||
4198 | << cLocale.toString(temperatureDelta->value()) << "</RefocusOnTemperatureDelta>" << endl; | ||||
4150 | outstream << "<RefocusEveryN enabled='" << (refocusEveryNCheck->isChecked() ? "true" : "false") << "'>" | 4199 | outstream << "<RefocusEveryN enabled='" << (refocusEveryNCheck->isChecked() ? "true" : "false") << "'>" | ||
4151 | << cLocale.toString(refocusEveryN->value()) << "</RefocusEveryN>" << endl; | 4200 | << cLocale.toString(refocusEveryN->value()) << "</RefocusEveryN>" << endl; | ||
4152 | foreach (SequenceJob * job, jobs) | 4201 | foreach (SequenceJob * job, jobs) | ||
4153 | { | 4202 | { | ||
4154 | job->getPrefixSettings(rawPrefix, filterEnabled, expEnabled, tsEnabled); | 4203 | job->getPrefixSettings(rawPrefix, filterEnabled, expEnabled, tsEnabled); | ||
4155 | 4204 | | |||
4156 | outstream << "<Job>" << endl; | 4205 | outstream << "<Job>" << endl; | ||
4157 | 4206 | | |||
▲ Show 20 Lines • Show All 2703 Lines • Show Last 20 Lines |
Good spot, wouldn't __LINE__ solve this problem? :)