Commit 1e083f0c authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Add support to dithering every X frames as requested

parent fcbacdf5
......@@ -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)
{
......
......@@ -573,7 +573,7 @@ private:
// Temporary Only
QProcess postCaptureScript;
uint8_t ditherCounter;
};
}
......
......@@ -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>
......
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment