summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-15 10:15:28 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-15 10:15:28 (GMT)
commit1e083f0c3d44321a403a8a215a56b36dfbc7dae3 (patch)
treee9f89b599d6a8c67980efaf2b8e5a3a07597f063
parentfcbacdf52b8f6500f1dabb57bb7b0411d1f5b208 (diff)
Add support to dithering every X frames as requested
-rw-r--r--kstars/ekos/capture/capture.cpp13
-rw-r--r--kstars/ekos/capture/capture.h2
-rw-r--r--kstars/ekos/guide/opsguide.ui108
-rw-r--r--kstars/kstars.kcfg4
4 files changed, 70 insertions, 57 deletions
diff --git a/kstars/ekos/capture/capture.cpp b/kstars/ekos/capture/capture.cpp
index 89a7cac..76629fd 100644
--- a/kstars/ekos/capture/capture.cpp
+++ b/kstars/ekos/capture/capture.cpp
@@ -365,6 +365,7 @@ void Capture::start()
deviationDetected = false;
spikeDetected = false;
+ ditherCounter = Options::ditherFrames();
initialHA = getCurrentHA();
meridianFlipStage = MF_NONE;
@@ -1176,14 +1177,14 @@ bool Capture::resumeSequence()
if (guideState == GUIDE_SUSPENDED && currentCCD->getChip(ISD::CCDChip::GUIDE_CCD) == guideChip)
emit resumeGuiding();
- //if (isAutoGuiding && guideDither && activeJob->getFrameType() == FRAME_LIGHT)
- if (guideState == GUIDE_GUIDING && Options::ditherEnabled() && activeJob->getFrameType() == FRAME_LIGHT)
+ if (guideState == GUIDE_GUIDING && Options::ditherEnabled() && activeJob->getFrameType() == FRAME_LIGHT && --ditherCounter == 0)
{
- secondsLabel->setText(i18n("Dithering..."));
- //emit exposureComplete();
+ ditherCounter = Options::ditherFrames();
- state = CAPTURE_DITHERING;
- emit newStatus(Ekos::CAPTURE_DITHERING);
+ secondsLabel->setText(i18n("Dithering..."));
+
+ state = CAPTURE_DITHERING;
+ emit newStatus(Ekos::CAPTURE_DITHERING);
}
else if (isAutoFocus && activeJob->getFrameType() == FRAME_LIGHT)
{
diff --git a/kstars/ekos/capture/capture.h b/kstars/ekos/capture/capture.h
index bbbad4e..23aa253 100644
--- a/kstars/ekos/capture/capture.h
+++ b/kstars/ekos/capture/capture.h
@@ -573,7 +573,7 @@ private:
// Temporary Only
QProcess postCaptureScript;
-
+ uint8_t ditherCounter;
};
}
diff --git a/kstars/ekos/guide/opsguide.ui b/kstars/ekos/guide/opsguide.ui
index 26f6cb2..77923bb 100644
--- a/kstars/ekos/guide/opsguide.ui
+++ b/kstars/ekos/guide/opsguide.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>269</width>
- <height>229</height>
+ <width>275</width>
+ <height>284</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -132,36 +132,11 @@
<property name="title">
<string>Settings</string>
</property>
- <layout class="QGridLayout" name="gridLayout">
- <property name="leftMargin">
- <number>4</number>
- </property>
- <property name="topMargin">
- <number>3</number>
- </property>
- <property name="rightMargin">
- <number>3</number>
- </property>
- <property name="bottomMargin">
- <number>3</number>
- </property>
- <item row="1" column="0">
- <widget class="QCheckBox" name="kcfg_DitherEnabled">
- <property name="toolTip">
- <string>Subframe the image around the guide star</string>
- </property>
- <property name="text">
- <string>Dither</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="kcfg_RapidGuideEnabled">
- <property name="enabled">
- <bool>false</bool>
- </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="l_19">
<property name="text">
- <string>Rapid Guide</string>
+ <string>Algorithm</string>
</property>
</widget>
</item>
@@ -189,10 +164,36 @@
</item>
</widget>
</item>
+ <item row="0" column="2">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="kcfg_DitherEnabled">
+ <property name="toolTip">
+ <string>Move locked guiding square location after frame capture</string>
+ </property>
+ <property name="text">
+ <string>Dither</string>
+ </property>
+ </widget>
+ </item>
<item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
<widget class="QDoubleSpinBox" name="kcfg_DitherPixels">
+ <property name="toolTip">
+ <string>Number of pixels to move the guiding square in a random direction.</string>
+ </property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
@@ -207,35 +208,42 @@
</property>
</widget>
</item>
- <item>
+ <item row="0" column="1">
<widget class="QLabel" name="l_22">
<property name="text">
<string>pixels</string>
</property>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QSpinBox" name="kcfg_DitherFrames">
+ <property name="toolTip">
+ <string>Dither after this many frames</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>frames</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="l_19">
+ <item row="2" column="0" colspan="2">
+ <widget class="QCheckBox" name="kcfg_RapidGuideEnabled">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="text">
- <string>Algorithm</string>
+ <string>Rapid Guide</string>
</property>
</widget>
</item>
- <item row="0" column="2">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
</item>
diff --git a/kstars/kstars.kcfg b/kstars/kstars.kcfg
index c28d25e..cc2ff39 100644
--- a/kstars/kstars.kcfg
+++ b/kstars/kstars.kcfg
@@ -1682,6 +1682,10 @@
<label>How many pixels to move between subsequent exposures under auto dithering mode.</label>
<default>2</default>
</entry>
+ <entry name="DitherFrames" type="UInt">
+ <label>Dither after this many frames.</label>
+ <default>1</default>
+ </entry>
<entry name="DitherEnabled" type="Bool">
<label>Use Auto Dithering when guiding.</label>
<default>false</default>