summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <[email protected]>2017-06-12 12:30:26 +0300
committerJasem Mutlaq <[email protected]>2017-06-12 12:30:26 +0300
commit1c9b5c68d424b971db7f9f111a3e31f3b90093c0 (patch)
tree9b640e9f50b6f8953c07b8d68abdacddd7589c7d
parent9096ca38f427caad992728a4ca4378a6602e2cb7 (diff)
Initial work for rotator support.
-rw-r--r--kstars/ekos/capture/capture.cpp8
-rw-r--r--kstars/ekos/capture/capture.h3
-rw-r--r--kstars/ekos/capture/capture.ui917
-rw-r--r--kstars/ekos/capture/sequencejob.cpp127
-rw-r--r--kstars/ekos/capture/sequencejob.h33
-rw-r--r--kstars/ekos/ekosmanager.cpp10
-rw-r--r--kstars/indi/indicommon.h3
7 files changed, 607 insertions, 494 deletions
diff --git a/kstars/ekos/capture/capture.cpp b/kstars/ekos/capture/capture.cpp
index d2d56ad..93a0300 100644
--- a/kstars/ekos/capture/capture.cpp
+++ b/kstars/ekos/capture/capture.cpp
@@ -196,6 +196,8 @@ Capture::Capture()
resetFrameB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
calibrationB->setIcon(QIcon::fromTheme("run-build", QIcon(":/icons/breeze/default/run-build.svg")));
calibrationB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
+ rotatorB->setIcon(QIcon::fromTheme("kstars_solarsystem", QIcon(":/icons/breeze/default/kstars_solarsystem.svg")));
+ rotatorB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
addToQueueB->setToolTip(i18n("Add job to sequence queue"));
removeFromQueueB->setToolTip(i18n("Remove job from sequence queue"));
@@ -2373,6 +2375,12 @@ void Capture::setFocusStatus(FocusState state)
}
}
+void Capture::setRotator(ISD::GDInterface *newRotator)
+{
+ currentRotator = newRotator;
+ rotatorB->setEnabled(true);
+}
+
void Capture::setTelescope(ISD::GDInterface *newTelescope)
{
currentTelescope = static_cast<ISD::Telescope *>(newTelescope);
diff --git a/kstars/ekos/capture/capture.h b/kstars/ekos/capture/capture.h
index 734fad2..417d74e 100644
--- a/kstars/ekos/capture/capture.h
+++ b/kstars/ekos/capture/capture.h
@@ -270,6 +270,7 @@ class Capture : public QWidget, public Ui::Capture
void addGuideHead(ISD::GDInterface *newCCD);
void syncFrameType(ISD::GDInterface *ccd);
void setTelescope(ISD::GDInterface *newTelescope);
+ void setRotator(ISD::GDInterface *newRotator);
void syncTelescopeInfo();
void syncFilterInfo();
@@ -548,7 +549,7 @@ class Capture : public QWidget, public Ui::Capture
ISD::Telescope *currentTelescope;
ISD::CCD *currentCCD;
- ISD::GDInterface *currentFilter;
+ ISD::GDInterface *currentFilter=nullptr, *currentRotator=nullptr;
ISD::DustCap *dustCap;
ISD::LightBox *lightBox;
ISD::Dome *dome;
diff --git a/kstars/ekos/capture/capture.ui b/kstars/ekos/capture/capture.ui
index 8ace501..e453d37 100644
--- a/kstars/ekos/capture/capture.ui
+++ b/kstars/ekos/capture/capture.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>623</width>
- <height>519</height>
+ <width>662</width>
+ <height>517</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,2">
@@ -27,7 +27,7 @@
<number>3</number>
</property>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_4">
+ <layout class="QVBoxLayout" name="leftLayout">
<property name="spacing">
<number>3</number>
</property>
@@ -51,10 +51,7 @@
<property name="title">
<string>CCD &amp;&amp; Filter Wheel</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="spacing">
- <number>3</number>
- </property>
+ <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>3</number>
</property>
@@ -67,7 +64,10 @@
<property name="bottomMargin">
<number>3</number>
</property>
- <item>
+ <property name="spacing">
+ <number>3</number>
+ </property>
+ <item row="0" column="0" colspan="7">
<layout class="QGridLayout" name="gridLayout_4">
<property name="spacing">
<number>3</number>
@@ -103,6 +103,9 @@
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_11">
+ <property name="spacing">
+ <number>3</number>
+ </property>
<item>
<widget class="QCheckBox" name="temperatureCheck">
<property name="toolTip">
@@ -204,7 +207,7 @@
</item>
</layout>
</item>
- <item>
+ <item row="1" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>3</number>
@@ -231,71 +234,370 @@
</item>
</layout>
</item>
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <property name="spacing">
+ <item row="2" column="0">
+ <widget class="QLabel" name="exposureLabel_2">
+ <property name="toolTip">
+ <string>Set the exposure time in seconds for individual images, if applicable</string>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Exposure:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2">
+ <widget class="QDoubleSpinBox" name="exposureIN">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="decimals">
<number>3</number>
</property>
- <item row="6" column="3">
- <widget class="QLabel" name="textLabel1_14">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>Y:</string>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QLabel" name="textLabel1_9">
- <property name="toolTip">
- <string>Horizontal and Vertical binning</string>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>Binning:</string>
- </property>
- </widget>
+ <property name="minimum">
+ <double>0.001000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>3600.000000000000000</double>
+ </property>
+ <property name="value">
+ <double>1.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3" colspan="2">
+ <widget class="QLabel" name="textLabel1_2_3">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Filter:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="5" colspan="2">
+ <widget class="QComboBox" name="FilterPosCombo">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="textLabel1_4">
+ <property name="toolTip">
+ <string>Number of images to capture</string>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Count:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="2">
+ <widget class="QSpinBox" name="countIN">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>999</number>
+ </property>
+ <property name="value">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3" colspan="2">
+ <widget class="QLabel" name="textLabel1_8">
+ <property name="toolTip">
+ <string>Delay in seconds between consecutive images</string>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Delay:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="5" colspan="2">
+ <widget class="QSpinBox" name="delayIN">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum">
+ <number>3600</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>Format:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="2">
+ <widget class="QComboBox" name="transferFormatCombo">
+ <property name="toolTip">
+ <string>Image Transfer Format</string>
+ </property>
+ <item>
+ <property name="text">
+ <string>FITS</string>
+ </property>
</item>
- <item row="7" column="3">
- <widget class="QLabel" name="textLabel1_16">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>H:</string>
- </property>
- </widget>
+ <item>
+ <property name="text">
+ <string>Native</string>
+ </property>
</item>
- <item row="1" column="1" colspan="2">
- <widget class="QSpinBox" name="countIN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>999</number>
- </property>
- <property name="value">
- <number>1</number>
+ </widget>
+ </item>
+ <item row="4" column="3" colspan="2">
+ <widget class="QLabel" name="ISOLabel">
+ <property name="text">
+ <string>ISO:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="5" colspan="2">
+ <widget class="QComboBox" name="ISOCombo">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>ISO settings</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="textLabel1_17">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Type:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1" colspan="2">
+ <widget class="QComboBox" name="frameTypeCombo">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="3" colspan="2">
+ <widget class="QLabel" name="gainLabel">
+ <property name="text">
+ <string>Gain:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="5" colspan="2">
+ <widget class="QDoubleSpinBox" name="gainIN"/>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="textLabel1_12">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Frame:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QLabel" name="textLabel1_13">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>X:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="2">
+ <widget class="QSpinBox" name="frameXIN">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="3">
+ <widget class="QLabel" name="textLabel1_14">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Y:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="4" colspan="2">
+ <widget class="QSpinBox" name="frameYIN">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="6">
+ <widget class="QPushButton" name="resetFrameB">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Reset CCD frame &amp; size values to default values</string>
+ </property>
+ <property name="text">
+ <string>Reset</string>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0">
+ <widget class="QLabel" name="textLabel1_19">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Size:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="1">
+ <widget class="QLabel" name="textLabel1_15">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>W:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="2">
+ <widget class="QSpinBox" name="frameWIN">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum">
+ <number>99</number>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="3">
+ <widget class="QLabel" name="textLabel1_16">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>H:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="4" colspan="2">
+ <widget class="QSpinBox" name="frameHIN">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="6" rowspan="2">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <property name="spacing">
+ <number>3</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="calibrationB">
+ <property name="enabled">
+ <bool>false</bool>
</property>
- </widget>
- </item>
- <item row="6" column="6">
- <widget class="QPushButton" name="resetFrameB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -304,8 +606,8 @@
</property>
<property name="minimumSize">
<size>
- <width>0</width>
- <height>0</height>
+ <width>22</width>
+ <height>22</height>
</size>
</property>
<property name="maximumSize">
@@ -315,10 +617,10 @@
</size>
</property>
<property name="toolTip">
- <string>Reset CCD frame &amp; size values to default values</string>
+ <string>Dark &amp; Flat frames automatic calibration options</string>
</property>
<property name="text">
- <string>Reset</string>
+ <string>Calibration</string>
</property>
<property name="iconSize">
<size>
@@ -328,392 +630,105 @@
</property>
</widget>
</item>
- <item row="0" column="5" colspan="2">
- <widget class="QComboBox" name="FilterPosCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="6" column="4" colspan="2">
- <widget class="QSpinBox" name="frameYIN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="0" column="1" colspan="2">
- <widget class="QDoubleSpinBox" name="exposureIN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>3</number>
- </property>
- <property name="minimum">
- <double>0.001000000000000</double>
- </property>
- <property name="maximum">
- <double>3600.000000000000000</double>
- </property>
- <property name="value">
- <double>1.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="textLabel1_4">
- <property name="toolTip">
- <string>Number of images to capture</string>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>Count:</string>
- </property>
- </widget>
- </item>
- <item row="8" column="2">
- <widget class="QSpinBox" name="binXIN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Horizontal binning</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>10</number>
- </property>
- <property name="value">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="7" column="4" colspan="2">
- <widget class="QSpinBox" name="frameHIN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="exposureLabel_2">
- <property name="toolTip">
- <string>Set the exposure time in seconds for individual images, if applicable</string>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>Exposure:</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QLabel" name="textLabel1_13">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>X:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>Format:</string>
- </property>
- </widget>
- </item>
- <item row="7" column="2">
- <widget class="QSpinBox" name="frameWIN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximum">
- <number>99</number>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="textLabel1_12">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>Frame:</string>
- </property>
- </widget>
- </item>
- <item row="8" column="1">
- <widget class="QLabel" name="textLabel1_10">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>H:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="3" colspan="2">
- <widget class="QLabel" name="ISOLabel">
- <property name="text">
- <string>ISO:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="5" colspan="2">
- <widget class="QSpinBox" name="delayIN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximum">
- <number>3600</number>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QLabel" name="textLabel1_15">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>W:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1" colspan="2">
- <widget class="QComboBox" name="frameTypeCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="8" column="4" colspan="2">
- <widget class="QSpinBox" name="binYIN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Vertical binning</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>10</number>
- </property>
- <property name="value">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="1" column="3" colspan="2">
- <widget class="QLabel" name="textLabel1_8">
- <property name="toolTip">
- <string>Delay in seconds between consecutive images</string>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>Delay:</string>
- </property>
- </widget>
- </item>
- <item row="6" column="2">
- <widget class="QSpinBox" name="frameXIN">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="8" column="3">
- <widget class="QLabel" name="textLabel1_11">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>V:</string>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="textLabel1_19">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>Size:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="textLabel1_17">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>Type:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="5" colspan="2">
- <widget class="QComboBox" name="ISOCombo">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>ISO settings</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1" colspan="2">
- <widget class="QComboBox" name="transferFormatCombo">
- <property name="toolTip">
- <string>Image Transfer Format</string>
- </property>
- <item>
- <property name="text">
- <string>FITS</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Native</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="0" column="3" colspan="2">
- <widget class="QLabel" name="textLabel1_2_3">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string/>
- </property>
- <property name="text">
- <string>Filter:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="3" colspan="2">
- <widget class="QLabel" name="gainLabel">
- <property name="text">
- <string>Gain:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="5" colspan="2">
- <widget class="QDoubleSpinBox" name="gainIN"/>
- </item>
- <item row="7" column="6" rowspan="2">
- <widget class="QPushButton" name="calibrationB">
+ <item>
+ <widget class="QPushButton" name="rotatorB">
<property name="enabled">
<bool>false</bool>
</property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
<property name="toolTip">
- <string>Dark &amp; Flat frames automatic calibration options</string>
+ <string>Rotator Control</string>
</property>
<property name="text">
- <string>Dark &amp;&amp; Flat
-Calibration</string>
- </property>
- <property name="iconSize">
- <size>
- <width>16</width>
- <height>16</height>
- </size>
+ <string>Rotator</string>
</property>
</widget>
</item>
</layout>
</item>
- <item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="textLabel1_9">
+ <property name="toolTip">
+ <string>Horizontal and Vertical binning</string>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Binning:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <widget class="QLabel" name="textLabel1_10">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>H:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="2">
+ <widget class="QSpinBox" name="binXIN">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Horizontal binning</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>10</number>
+ </property>
+ <property name="value">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="3">
+ <widget class="QLabel" name="textLabel1_11">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string/>
+ </property>
+ <property name="text">
+ <string>V:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="4" colspan="2">
+ <widget class="QSpinBox" name="binYIN">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Vertical binning</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>10</number>
+ </property>
+ <property name="value">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>3</number>
@@ -740,7 +755,7 @@ Calibration</string>
</item>
</layout>
</item>
- <item>
+ <item row="10" column="0" colspan="7">
<layout class="QGridLayout" name="gridLayout_3">
<property name="spacing">
<number>3</number>
@@ -1102,7 +1117,7 @@ Calibration</string>
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_5">
+ <layout class="QVBoxLayout" name="rightLayout">
<property name="spacing">
<number>3</number>
</property>
@@ -1732,7 +1747,7 @@ Calibration</string>
<item>
<layout class="QGridLayout" name="progressLayout">
<property name="spacing">
- <number>5</number>
+ <number>3</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="progressLabel_3">
diff --git a/kstars/ekos/capture/sequencejob.cpp b/kstars/ekos/capture/sequencejob.cpp
index c226da4..211dd1b 100644
--- a/kstars/ekos/capture/sequencejob.cpp
+++ b/kstars/ekos/capture/sequencejob.cpp
@@ -20,8 +20,7 @@
#include "ui_calibrationoptions.h"
-#define INVALID_TEMPERATURE 10000
-#define INVALID_HA 10000
+#define INVALID_VALUE -1e6
#define MF_TIMER_TIMEOUT 90000
#define MF_RA_DIFF_LIMIT 4
#define MAX_CAPTURE_RETRIES 3
@@ -34,18 +33,19 @@ SequenceJob::SequenceJob()
<< i18n("Complete");
status = JOB_IDLE;
exposure = count = delay = targetFilter = isoIndex = gain = -1;
- frameType = FRAME_LIGHT;
- currentTemperature = targetTemperature = INVALID_TEMPERATURE;
- captureFilter = FITS_NONE;
- preview = false;
- filterReady = temperatureReady = filterPostFocusReady = prepareReady = true;
- enforceTemperature = false;
- activeChip = nullptr;
- activeCCD = nullptr;
- activeFilter = nullptr;
- statusCell = nullptr;
- completed = 0;
- captureRetires = 0;
+ frameType = FRAME_LIGHT;
+ currentTemperature = targetTemperature = INVALID_VALUE;
+ captureFilter = FITS_NONE;
+ preview = false;
+ prepareReady = true;
+ enforceTemperature = false;
+ activeChip = nullptr;
+ activeCCD = nullptr;
+ activeFilter = nullptr;
+ statusCell = nullptr;
+ completed = 0;
+ captureRetires = 0;
+ targetRotation = currentRotation = INVALID_VALUE;
calibrationSettings.flatFieldSource = SOURCE_MANUAL;
calibrationSettings.flatFieldDuration = DURATION_MANUAL;
@@ -58,6 +58,11 @@ SequenceJob::SequenceJob()
filterPrefixEnabled = false;
expPrefixEnabled = false;
timeStampPrefixEnabled = false;
+
+ prepareActions[ACTION_FILTER] = true;
+ prepareActions[ACTION_TEMPERATURE] = true;
+ prepareActions[ACTION_POST_FOCUS] = true;
+ prepareActions[ACTION_ROTATOR] = true;
}
void SequenceJob::reset()
@@ -68,7 +73,7 @@ void SequenceJob::reset()
void SequenceJob::resetStatus()
{
- status = JOB_IDLE;
+ status = JOB_IDLE;
completed = 0;
exposeLeft = 0;
captureRetires = 0;
@@ -97,6 +102,8 @@ void SequenceJob::done()
void SequenceJob::prepareCapture()
{
prepareReady = false;
+ // Reset all prepare actions
+ setAllActionsReady();
activeChip->setBatchMode(!preview);
@@ -126,38 +133,64 @@ void SequenceJob::prepareCapture()
activeCCD->setGain(gain);
}
- if (frameType == FRAME_DARK || frameType == FRAME_BIAS)
- {
- filterReady = true;
- }
- else if (targetFilter != -1 && activeFilter != nullptr)
+ // Check if we need to change filter wheel
+ if ((frameType == FRAME_LIGHT || frameType == FRAME_LIGHT) && targetFilter != -1 && activeFilter != nullptr)
{
if (targetFilter == currentFilter)
- filterReady = true;
+ prepareActions[ACTION_FILTER] = true;
else
{
- filterReady = false;
+ prepareActions[ACTION_FILTER] = false;
// Post Focus on Filter change. If frame is NOT light, then we do not perform autofocusing on filter change
- filterPostFocusReady = (!Options::autoFocusOnFilterChange() || frameType != FRAME_LIGHT);
+ prepareActions[ACTION_POST_FOCUS] = (!Options::autoFocusOnFilterChange() || frameType != FRAME_LIGHT);
activeFilter->runCommand(INDI_SET_FILTER, &targetFilter);
}
}
+ // Check if we need to update temperature
if (enforceTemperature && fabs(targetTemperature - currentTemperature) > Options::maxTemperatureDiff())
{
- temperatureReady = false;
+ prepareActions[ACTION_TEMPERATURE] = false;
activeCCD->setTemperature(targetTemperature);
}
- if (prepareReady == false && temperatureReady && filterReady)
+ // Check if we need to update rotator
+ if (targetRotation != INVALID_VALUE && currentRotation != targetRotation)
+ {
+ prepareActions[ACTION_ROTATOR] = false;
+ activeRotator->runCommand(INDI_SET_ROTATOR, &targetRotation);
+ }
+
+ if (prepareReady == false && areActionsReady())
{
prepareReady = true;
emit prepareComplete();
}
}
+void SequenceJob::setAllActionsReady()
+{
+ QMutableMapIterator<PrepareActions, bool> i(prepareActions);
+ while (i.hasNext())
+ {
+ i.next();
+ i.setValue(true);
+ }
+}
+
+bool SequenceJob::areActionsReady()
+{
+ foreach (bool ready, prepareActions)
+ {
+ if (ready == false)
+ return false;
+ }
+
+ return true;
+}
+
//SequenceJob::CAPTUREResult SequenceJob::capture(bool isDark)
SequenceJob::CAPTUREResult SequenceJob::capture(bool noCaptureFilter)
{
@@ -278,10 +311,9 @@ void SequenceJob::setCurrentTemperature(double value)
currentTemperature = value;
if (enforceTemperature == false || fabs(targetTemperature - currentTemperature) <= Options::maxTemperatureDiff())
- temperatureReady = true;
+ prepareActions[ACTION_TEMPERATURE] = true;
- if (prepareReady == false && filterReady && temperatureReady && filterPostFocusReady &&
- (status == JOB_IDLE || status == JOB_ABORTED))
+ if (prepareReady == false && areActionsReady() && (status == JOB_IDLE || status == JOB_ABORTED))
{
prepareReady = true;
emit prepareComplete();
@@ -400,15 +432,14 @@ void SequenceJob::setRootFITSDir(const QString &value)
bool SequenceJob::getFilterPostFocusReady() const
{
- return filterPostFocusReady;
+ return prepareActions[ACTION_POST_FOCUS];
}
void SequenceJob::setFilterPostFocusReady(bool value)
{
- filterPostFocusReady = value;
+ prepareActions[ACTION_POST_FOCUS] = value;
- if (prepareReady == false && filterPostFocusReady && filterReady && temperatureReady &&
- (status == JOB_IDLE || status == JOB_ABORTED))
+ if (prepareReady == false && areActionsReady() && (status == JOB_IDLE || status == JOB_ABORTED))
{
prepareReady = true;
emit prepareComplete();
@@ -465,6 +496,16 @@ void SequenceJob::setGain(double value)
gain = value;
}
+int32_t SequenceJob::getTargetRotation() const
+{
+ return targetRotation;
+}
+
+void SequenceJob::setTargetRotation(int32_t value)
+{
+ targetRotation = value;
+}
+
int SequenceJob::getISOIndex() const
{
return isoIndex;
@@ -485,15 +526,29 @@ void SequenceJob::setCurrentFilter(int value)
currentFilter = value;
if (currentFilter == targetFilter)
- filterReady = true;
+ prepareActions[ACTION_FILTER] = true;
- if (prepareReady == false && filterReady && temperatureReady && filterPostFocusReady &&
- (status == JOB_IDLE || status == JOB_ABORTED))
+ if (prepareReady == false && areActionsReady() && (status == JOB_IDLE || status == JOB_ABORTED))
{
prepareReady = true;
emit prepareComplete();
}
- else if (filterReady && filterPostFocusReady == false)
+ else if (prepareActions[ACTION_FILTER] == true && prepareActions[ACTION_POST_FOCUS] == false)
emit checkFocus();
}
+
+void SequenceJob::setCurrentRotation(int32_t value)
+{
+ currentRotation = value;
+
+ if (currentRotation == targetRotation)
+ prepareActions[ACTION_ROTATOR] = true;
+
+ if (prepareReady == false && areActionsReady() && (status == JOB_IDLE || status == JOB_ABORTED))
+ {
+ prepareReady = true;
+ emit prepareComplete();
+ }
+
+}
}
diff --git a/kstars/ekos/capture/sequencejob.h b/kstars/ekos/capture/sequencejob.h
index 43c9c83..4d0ff0e 100644
--- a/kstars/ekos/capture/sequencejob.h
+++ b/kstars/ekos/capture/sequencejob.h
@@ -29,13 +29,21 @@ class SequenceJob : public QObject
public:
typedef enum { JOB_IDLE, JOB_BUSY, JOB_ERROR, JOB_ABORTED, JOB_DONE } JOBStatus;
- typedef enum {
+ typedef enum
+ {
CAPTURE_OK,
CAPTURE_FRAME_ERROR,
CAPTURE_BIN_ERROR,
CAPTURE_FILTER_BUSY,
CAPTURE_FOCUS_ERROR
} CAPTUREResult;
+ typedef enum
+ {
+ ACTION_FILTER,
+ ACTION_TEMPERATURE,
+ ACTION_POST_FOCUS,
+ ACTION_ROTATOR
+ } PrepareActions;
SequenceJob();
~SequenceJob() {}
@@ -61,6 +69,9 @@ class SequenceJob : public QObject
void setActiveFilter(ISD::GDInterface *filter) { activeFilter = filter; }
ISD::GDInterface *getActiveFilter() { return activeFilter; }
+ void setActiveRotator(ISD::GDInterface *rotator) { activeRotator = rotator; }
+ ISD::GDInterface *getActiveRotator() { return activeRotator; }
+
void setActiveChip(ISD::CCDChip *chip) { activeChip = chip; }
ISD::CCDChip *getActiveChip() { return activeChip; }
@@ -177,15 +188,20 @@ class SequenceJob : public QObject
double getGain() const;
void setGain(double value);
- signals:
+ int32_t getTargetRotation() const;
+ void setTargetRotation(int32_t value);
+
+ void setCurrentRotation(int32_t value);
+
+signals:
void prepareComplete();
void checkFocus();
- private:
+private:
QStringList statusStrings;
ISD::CCDChip *activeChip;
ISD::CCD *activeCCD;
- ISD::GDInterface *activeFilter;
+ ISD::GDInterface *activeFilter=nullptr, *activeRotator=nullptr;
double exposure;
CCDFrameType frameType;
@@ -199,7 +215,8 @@ class SequenceJob : public QObject
int count;
int delay;
bool preview;
- bool filterReady, temperatureReady, filterPostFocusReady, prepareReady;
+ //bool filterReady, temperatureReady, filterPostFocusReady, prepareReady;
+ bool prepareReady;
bool enforceTemperature;
int isoIndex;
int captureRetires;
@@ -207,6 +224,8 @@ class SequenceJob : public QObject
double exposeLeft;
double currentTemperature, targetTemperature;
double gain;
+ // Rotation in absolute ticks, NOT angle
+ int32_t targetRotation, currentRotation;
FITSScale captureFilter;
QTableWidgetItem *statusCell;
QString fitsDir;
@@ -238,6 +257,10 @@ class SequenceJob : public QObject
bool preDomePark;
} calibrationSettings;
+
+ QMap<PrepareActions, bool> prepareActions;
+ bool areActionsReady();
+ void setAllActionsReady();
};
}
diff --git a/kstars/ekos/ekosmanager.cpp b/kstars/ekos/ekosmanager.cpp
index 23f15b5..765e448 100644
--- a/kstars/ekos/ekosmanager.cpp
+++ b/kstars/ekos/ekosmanager.cpp
@@ -1434,6 +1434,16 @@ void EkosManager::processNewProperty(INDI::Property *prop)
}
}
+ if (!strcmp(prop->getName(), "ABS_ROTATOR_POSITION"))
+ {
+ if (captureProcess)
+ {
+ ISD::GDInterface *interface = qobject_cast<ISD::GDInterface *>(sender());
+ if (interface)
+ captureProcess->setRotator(interface);
+ }
+ }
+
if (focusProcess && strstr(prop->getName(), "FOCUS_"))
{
focusProcess->checkFocuser();
diff --git a/kstars/indi/indicommon.h b/kstars/indi/indicommon.h
index cdcb7fa..191ccce 100644
--- a/kstars/indi/indicommon.h
+++ b/kstars/indi/indicommon.h
@@ -177,7 +177,8 @@ typedef enum {
INDI_SET_PORT,
INDI_CONNECT,
INDI_DISCONNECT,
- INDI_SET_FILTER
+ INDI_SET_FILTER,
+ INDI_SET_ROTATOR
} DeviceCommand;
typedef enum { SOURCE_MANUAL, SOURCE_FLATCAP, SOURCE_WALL, SOURCE_DAWN_DUSK, SOURCE_DARKCAP } FlatFieldSource;