Commit f1c93b07 authored by Michael Fulbright's avatar Michael Fulbright Committed by Jasem Mutlaq
Browse files

Add dither size in pixels and dither timeout to UI

parent 0a06ac51
......@@ -486,9 +486,9 @@ bool PHD2::guide()
QJsonArray args;
QJsonObject settle;
settle.insert("pixels", 1.5);
settle.insert("time", 8);
settle.insert("timeout", 45);
settle.insert("pixels", static_cast<double>(Options::ditherThreshold()));
settle.insert("time", static_cast<int>(Options::ditherSettle()));
settle.insert("timeout", static_cast<int>(Options::ditherTimeout()));
// Settle param
args << settle;
......@@ -561,9 +561,9 @@ bool PHD2::dither(double pixels)
QJsonArray args;
QJsonObject settle;
settle.insert("pixels", 1.5);
settle.insert("pixels", static_cast<double>(Options::ditherThreshold()));
settle.insert("time", static_cast<int>(Options::ditherSettle()));
settle.insert("timeout", 45);
settle.insert("timeout", static_cast<int>(Options::ditherTimeout()));
// Pixels
args << pixels;
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>297</width>
<height>296</height>
<width>379</width>
<height>378</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
......@@ -34,10 +34,10 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="l_19">
<item row="2" column="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Algorithm</string>
<string>pixels</string>
</property>
</widget>
</item>
......@@ -51,70 +51,60 @@
</property>
</widget>
</item>
<item row="1" column="1">
<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>
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>2.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="l_22">
<item row="1" column="4">
<widget class="QLabel" name="label">
<property name="text">
<string>pixels every</string>
<string>frames</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="kcfg_DitherFrames">
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="kcfg_DitherThreshold">
<property name="toolTip">
<string>Dither after this many captured frames in the CCD module</string>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QLabel" name="label">
<property name="text">
<string>frames</string>
<string>Maximum allowable distance for guiding to be considered settled.</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="label_6">
<property name="toolTip">
<string>After dither is successful, wait for this many seconds before proceeding.</string>
<string/>
</property>
<property name="text">
<string>Settle:</string>
<string>Threshold</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QSpinBox" name="kcfg_DitherSettle">
<property name="toolTip">
<string>After dither is successful, wait for this many seconds before proceeding.</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_5">
<item row="0" column="0">
<widget class="QLabel" name="l_19">
<property name="text">
<string>seconds</string>
<string>Algorithm</string>
</property>
</widget>
</item>
<item row="1" column="1">
<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>
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>2.000000000000000</double>
</property>
</widget>
</item>
......@@ -148,6 +138,61 @@
</item>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="kcfg_DitherFrames">
<property name="toolTip">
<string>Dither after this many captured frames in the CCD module</string>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="l_22">
<property name="text">
<string>pixels every</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="toolTip">
<string>After dither is successful, wait for this many seconds before proceeding.</string>
</property>
<property name="text">
<string>Settle:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_5">
<property name="text">
<string>seconds</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Timeout</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="kcfg_DitherTimeout">
<property name="toolTip">
<string>time limit for successful dither settling</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_9">
<property name="text">
<string>seconds</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
......
......@@ -1817,6 +1817,14 @@
<label>After dither is successful, wait for this many seconds before proceeding.</label>
<default>0</default>
</entry>
<entry name="DitherThreshold" type="Double">
<label>Maximum distance (pixels) for guiding to be considered settled.</label>
<default>1</default>
</entry>
<entry name="DitherTimeout" type="UInt">
<label>Time limit (seconds) on dithering to settle down.</label>
<default>45</default>
</entry>
<entry name="DitherMaxIterations" type="UInt">
<label>How many dithering attempts to undertake before giving up.</label>
<default>10</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