Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/capture/sequencejob.cpp
Property | Old Value | New Value |
---|---|---|
File Mode | 100644 | 100755 |
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | 68 | { | |||
---|---|---|---|---|---|
70 | 70 | | |||
71 | prepareReady = false; | 71 | prepareReady = false; | ||
72 | 72 | | |||
73 | // Reset all prepare actions | 73 | // Reset all prepare actions | ||
74 | setAllActionsReady(); | 74 | setAllActionsReady(); | ||
75 | 75 | | |||
76 | activeChip->setBatchMode(!preview); | 76 | activeChip->setBatchMode(!preview); | ||
77 | 77 | | |||
78 | // Check if we need to change filter wheel | 78 | // Filter changes are done in capture(); | ||
79 | if (frameType == FRAME_LIGHT && targetFilter != -1 && activeFilter != nullptr) | | |||
80 | { | | |||
81 | if (targetFilter == currentFilter) | | |||
82 | prepareActions[ACTION_FILTER] = true; | | |||
83 | else | | |||
84 | { | | |||
85 | prepareActions[ACTION_FILTER] = false; | | |||
86 | | ||||
87 | emit prepareState(CAPTURE_CHANGING_FILTER); | | |||
88 | | ||||
89 | FilterManager::FilterPolicy policy = FilterManager::ALL_POLICIES; | | |||
90 | // Don't perform autofocus on preview | | |||
91 | if (isPreview()) | | |||
92 | policy = static_cast<FilterManager::FilterPolicy>(policy & ~FilterManager::AUTOFOCUS_POLICY); | | |||
93 | | ||||
94 | filterManager->setFilterPosition(targetFilter, policy); | | |||
95 | } | | |||
96 | } | | |||
97 | else | | |||
98 | { | | |||
99 | prepareActions[ACTION_FILTER] = true; | 79 | prepareActions[ACTION_FILTER] = true; | ||
100 | } | | |||
101 | 80 | | |||
102 | // Check if we need to update temperature | 81 | // Check if we need to update temperature | ||
103 | if (enforceTemperature && fabs(targetTemperature - currentTemperature) > Options::maxTemperatureDiff()) | 82 | if (enforceTemperature && fabs(targetTemperature - currentTemperature) > Options::maxTemperatureDiff()) | ||
104 | { | 83 | { | ||
105 | prepareActions[ACTION_TEMPERATURE] = false; | 84 | prepareActions[ACTION_TEMPERATURE] = false; | ||
106 | emit prepareState(CAPTURE_SETTING_TEMPERATURE); | 85 | emit prepareState(CAPTURE_SETTING_TEMPERATURE); | ||
107 | activeCCD->setTemperature(targetTemperature); | 86 | activeCCD->setTemperature(targetTemperature); | ||
108 | } | 87 | } | ||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Line(s) | 202 | { | |||
267 | { | 246 | { | ||
268 | activeCCD->setGain(gain); | 247 | activeCCD->setGain(gain); | ||
269 | } | 248 | } | ||
270 | 249 | | |||
271 | if (targetFilter != -1 && activeFilter != nullptr) | 250 | if (targetFilter != -1 && activeFilter != nullptr) | ||
272 | { | 251 | { | ||
273 | if (targetFilter != currentFilter) | 252 | if (targetFilter != currentFilter) | ||
274 | { | 253 | { | ||
254 | emit prepareState(CAPTURE_CHANGING_FILTER); | ||||
255 | | ||||
275 | FilterManager::FilterPolicy policy = FilterManager::ALL_POLICIES; | 256 | FilterManager::FilterPolicy policy = FilterManager::ALL_POLICIES; | ||
276 | // Don't perform autofocus on preview | 257 | // Don't perform autofocus on preview or calibration frames. | ||
277 | if (isPreview()) | 258 | if (isPreview() || frameType != FRAME_LIGHT) | ||
278 | policy = static_cast<FilterManager::FilterPolicy>(policy & ~FilterManager::AUTOFOCUS_POLICY); | 259 | policy = static_cast<FilterManager::FilterPolicy>(policy & ~FilterManager::AUTOFOCUS_POLICY); | ||
279 | 260 | | |||
280 | filterManager->setFilterPosition(targetFilter, policy); | 261 | filterManager->setFilterPosition(targetFilter, policy); | ||
281 | return CAPTURE_FILTER_BUSY; | 262 | return CAPTURE_FILTER_BUSY; | ||
282 | } | 263 | } | ||
283 | } | 264 | } | ||
284 | 265 | | |||
285 | // Only attempt to set ROI and Binning if CCD transfer format is FITS | 266 | // Only attempt to set ROI and Binning if CCD transfer format is FITS | ||
▲ Show 20 Lines • Show All 306 Lines • Show Last 20 Lines |