Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/capture/capture.cpp
Property | Old Value | New Value |
---|---|---|
File Mode | 100644 | 100755 |
Show First 20 Lines • Show All 1803 Lines • ▼ Show 20 Line(s) | 1799 | { | |||
---|---|---|---|---|---|
1804 | if (currentCCD->isLooping()) | 1804 | if (currentCCD->isLooping()) | ||
1805 | targetChip->abortExposure(); | 1805 | targetChip->abortExposure(); | ||
1806 | 1806 | | |||
1807 | // If we are over 30 mins since last autofocus, we'll reset frame. | 1807 | // If we are over 30 mins since last autofocus, we'll reset frame. | ||
1808 | if (refocusEveryN->value() >= 30) | 1808 | if (refocusEveryN->value() >= 30) | ||
1809 | emit resetFocus(); | 1809 | emit resetFocus(); | ||
1810 | 1810 | | |||
1811 | // force refocus | 1811 | // force refocus | ||
1812 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 1812."; | ||||
1812 | emit checkFocus(0.1); | 1813 | emit checkFocus(0.1); | ||
1813 | 1814 | | |||
1814 | m_State = CAPTURE_FOCUSING; | 1815 | m_State = CAPTURE_FOCUSING; | ||
1815 | emit newStatus(Ekos::CAPTURE_FOCUSING); | 1816 | emit newStatus(Ekos::CAPTURE_FOCUSING); | ||
1816 | } | 1817 | } | ||
1817 | else if (isInSequenceFocus && activeJob->getFrameType() == FRAME_LIGHT && --inSequenceFocusCounter == 0) | 1818 | else if (isInSequenceFocus && activeJob->getFrameType() == FRAME_LIGHT && --inSequenceFocusCounter == 0) | ||
1818 | { | 1819 | { | ||
1819 | inSequenceFocusCounter = Options::inSequenceCheckFrames(); | 1820 | inSequenceFocusCounter = Options::inSequenceCheckFrames(); | ||
Show All 11 Lines | |||||
1831 | } | 1832 | } | ||
1832 | 1833 | | |||
1833 | secondsLabel->setText(i18n("Focusing...")); | 1834 | secondsLabel->setText(i18n("Focusing...")); | ||
1834 | 1835 | | |||
1835 | if (currentCCD->isLooping()) | 1836 | if (currentCCD->isLooping()) | ||
1836 | targetChip->abortExposure(); | 1837 | targetChip->abortExposure(); | ||
1837 | 1838 | | |||
1838 | if (HFRPixels->value() == 0) | 1839 | if (HFRPixels->value() == 0) | ||
1840 | { | ||||
1841 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 1841."; | ||||
1839 | emit checkFocus(0.1); | 1842 | emit checkFocus(0.1); | ||
1843 | } | ||||
1840 | else | 1844 | else | ||
1845 | { | ||||
1846 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 1846."; | ||||
1841 | emit checkFocus(HFRPixels->value()); | 1847 | emit checkFocus(HFRPixels->value()); | ||
1848 | } | ||||
1842 | 1849 | | |||
1843 | qCDebug(KSTARS_EKOS_CAPTURE) << "In-sequence focusing started..."; | 1850 | qCDebug(KSTARS_EKOS_CAPTURE) << "In-sequence focusing started..."; | ||
1844 | 1851 | | |||
1845 | m_State = CAPTURE_FOCUSING; | 1852 | m_State = CAPTURE_FOCUSING; | ||
1846 | emit newStatus(Ekos::CAPTURE_FOCUSING); | 1853 | emit newStatus(Ekos::CAPTURE_FOCUSING); | ||
1847 | } | 1854 | } | ||
1848 | #endif | 1855 | #endif | ||
1849 | // Check if we need to do autofocus, if not let's check if we need looping or start next exposure | 1856 | // Check if we need to do autofocus, if not let's check if we need looping or start next exposure | ||
Show All 39 Lines | 1891 | { | |||
1889 | if (currentCCD->isLooping()) | 1896 | if (currentCCD->isLooping()) | ||
1890 | targetChip->abortExposure(); | 1897 | targetChip->abortExposure(); | ||
1891 | 1898 | | |||
1892 | // If we are over 30 mins since last autofocus, we'll reset frame. | 1899 | // If we are over 30 mins since last autofocus, we'll reset frame. | ||
1893 | if (refocusEveryN->value() >= 30) | 1900 | if (refocusEveryN->value() >= 30) | ||
1894 | emit resetFocus(); | 1901 | emit resetFocus(); | ||
1895 | 1902 | | |||
1896 | // force refocus | 1903 | // force refocus | ||
1904 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 1904."; | ||||
1897 | emit checkFocus(0.1); | 1905 | emit checkFocus(0.1); | ||
1898 | 1906 | | |||
1899 | m_State = CAPTURE_FOCUSING; | 1907 | m_State = CAPTURE_FOCUSING; | ||
1900 | emit newStatus(Ekos::CAPTURE_FOCUSING); | 1908 | emit newStatus(Ekos::CAPTURE_FOCUSING); | ||
1901 | return true; | 1909 | return true; | ||
1902 | } | 1910 | } | ||
1903 | else if (isInSequenceFocus && inSequenceFocusCounter == 0) | 1911 | else if (isInSequenceFocus && inSequenceFocusCounter == 0) | ||
1904 | { | 1912 | { | ||
Show All 12 Lines | |||||
1917 | } | 1925 | } | ||
1918 | 1926 | | |||
1919 | secondsLabel->setText(i18n("Focusing...")); | 1927 | secondsLabel->setText(i18n("Focusing...")); | ||
1920 | 1928 | | |||
1921 | if (currentCCD->isLooping()) | 1929 | if (currentCCD->isLooping()) | ||
1922 | targetChip->abortExposure(); | 1930 | targetChip->abortExposure(); | ||
1923 | 1931 | | |||
1924 | if (HFRPixels->value() == 0) | 1932 | if (HFRPixels->value() == 0) | ||
1933 | { | ||||
1934 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 1934."; | ||||
1925 | emit checkFocus(0.1); | 1935 | emit checkFocus(0.1); | ||
1936 | } | ||||
1926 | else | 1937 | else | ||
1938 | { | ||||
1939 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 1939."; | ||||
1927 | emit checkFocus(HFRPixels->value()); | 1940 | emit checkFocus(HFRPixels->value()); | ||
1941 | } | ||||
1928 | 1942 | | |||
1929 | qCDebug(KSTARS_EKOS_CAPTURE) << "In-sequence focusing started..."; | 1943 | qCDebug(KSTARS_EKOS_CAPTURE) << "In-sequence focusing started..."; | ||
1930 | 1944 | | |||
1931 | m_State = CAPTURE_FOCUSING; | 1945 | m_State = CAPTURE_FOCUSING; | ||
1932 | emit newStatus(Ekos::CAPTURE_FOCUSING); | 1946 | emit newStatus(Ekos::CAPTURE_FOCUSING); | ||
1933 | return true; | 1947 | return true; | ||
1934 | } | 1948 | } | ||
1935 | 1949 | | |||
▲ Show 20 Lines • Show All 228 Lines • ▼ Show 20 Line(s) | 2170 | #if 0 | |||
2164 | // FIXME ought to be able to combine these - only different is value passed | 2178 | // FIXME ought to be able to combine these - only different is value passed | ||
2165 | // to checkFocus() | 2179 | // to checkFocus() | ||
2166 | // 2018-08-23 Jasem: For now in-sequence-focusing takes precedence. | 2180 | // 2018-08-23 Jasem: For now in-sequence-focusing takes precedence. | ||
2167 | if (isInSequenceFocus && requiredAutoFocusStarted == false) | 2181 | if (isInSequenceFocus && requiredAutoFocusStarted == false) | ||
2168 | { | 2182 | { | ||
2169 | requiredAutoFocusStarted = true; | 2183 | requiredAutoFocusStarted = true; | ||
2170 | secondsLabel->setText(i18n("Focusing...")); | 2184 | secondsLabel->setText(i18n("Focusing...")); | ||
2171 | qCDebug(KSTARS_EKOS_CAPTURE) << "Requesting focusing if HFR >" << HFRPixels->value(); | 2185 | qCDebug(KSTARS_EKOS_CAPTURE) << "Requesting focusing if HFR >" << HFRPixels->value(); | ||
2186 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 2186."; | ||||
2172 | emit checkFocus(HFRPixels->value()); | 2187 | emit checkFocus(HFRPixels->value()); | ||
2173 | m_State = CAPTURE_FOCUSING; | 2188 | m_State = CAPTURE_FOCUSING; | ||
2174 | emit newStatus(Ekos::CAPTURE_FOCUSING); | 2189 | emit newStatus(Ekos::CAPTURE_FOCUSING); | ||
2175 | return true; | 2190 | return true; | ||
2176 | } | 2191 | } | ||
2177 | else if (isRefocus) | 2192 | else if (isRefocus) | ||
2178 | { | 2193 | { | ||
2179 | appendLogText(i18n("Scheduled refocus started...")); | 2194 | appendLogText(i18n("Scheduled refocus started...")); | ||
2180 | 2195 | | |||
2181 | secondsLabel->setText(i18n("Focusing...")); | 2196 | secondsLabel->setText(i18n("Focusing...")); | ||
2197 | qCDebug(KSTARS_EKOS_CAPTURE) << "Capture is triggering autofocus on line 2197."; | ||||
2182 | emit checkFocus(0.1); | 2198 | emit checkFocus(0.1); | ||
2183 | m_State = CAPTURE_FOCUSING; | 2199 | m_State = CAPTURE_FOCUSING; | ||
2184 | emit newStatus(Ekos::CAPTURE_FOCUSING); | 2200 | emit newStatus(Ekos::CAPTURE_FOCUSING); | ||
2185 | return true; | 2201 | return true; | ||
2186 | } | 2202 | } | ||
2187 | #endif | 2203 | #endif | ||
2188 | 2204 | | |||
2189 | if (m_State == CAPTURE_DITHERING && m_AutoFocusReady && startFocusIfRequired()) | 2205 | if (m_State == CAPTURE_DITHERING && m_AutoFocusReady && startFocusIfRequired()) | ||
▲ Show 20 Lines • Show All 4492 Lines • Show Last 20 Lines |