Commit a95a6866 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Moving DSLR transfer format option to capture instead of options. It is not...

Moving DSLR transfer format option to capture instead of options. It is not recorded in the sequence file like other parameters
parent 6974f256
......@@ -597,10 +597,14 @@ void Capture::checkCCD(int ccdNum)
QStringList isoList = targetChip->getISOList();
ISOCombo->clear();
transferFormatCombo->clear();
if (isoList.isEmpty())
{
ISOCombo->setEnabled(false);
ISOLabel->setEnabled(false);
// Only one trasnfer format
transferFormatCombo->addItem(i18n("FITS"));
}
else
{
......@@ -609,17 +613,9 @@ void Capture::checkCCD(int ccdNum)
ISOCombo->addItems(isoList);
ISOCombo->setCurrentIndex(targetChip->getISOIndex());
int currentDSLRTransferOption = Options::dSLRFormatFITS() ? ISD::CCD::FORMAT_FITS : ISD::CCD::FORMAT_NATIVE;
if (currentDSLRTransferOption != lastDSLRTransforFormat)
{
if (currentDSLRTransferOption == ISD::CCD::FORMAT_FITS)
appendLogText(i18n("Using FITS transfer format from DSLR camera. Configure DSLR transfer format in options."));
else
appendLogText(i18n("Using native transfer format from DSLR camera. Configure DSLR transfer format in options."));
lastDSLRTransforFormat = currentDSLRTransferOption;
}
// DSLRs have two transfer formats
transferFormatCombo->addItem(i18n("FITS"));
transferFormatCombo->addItem(i18n("Native"));
double pixelX=0, pixelY=0;
bool rc = targetChip->getPixelSize(pixelX, pixelY);
......@@ -1256,7 +1252,7 @@ void Capture::captureOne()
return;
}
if (currentCCD->getTransferFormat() == ISD::CCD::FORMAT_NATIVE && darkSubCheck->isChecked())
if (transferFormatCombo->currentIndex() == ISD::CCD::FORMAT_NATIVE && darkSubCheck->isChecked())
{
appendLogText(i18n("Cannot perform auto dark subtraction of native DSLR formats."));
return;
......@@ -1347,7 +1343,7 @@ void Capture::captureImage()
}
// If using DSLR, make sure it is set to correct transfer format
currentCCD->setTransformFormat(Options::dSLRFormatFITS() ? ISD::CCD::FORMAT_FITS : ISD::CCD::FORMAT_NATIVE);
currentCCD->setTransformFormat(activeJob->getTransforFormat());
rc = activeJob->capture(darkSubCheck->isChecked() ? true : false);
......@@ -1587,6 +1583,8 @@ void Capture::addJob(bool preview)
if (ISOCombo->isEnabled())
job->setISOIndex(ISOCombo->currentIndex());
job->setTransforFormat(static_cast<ISD::CCD::TransferFormat>(transferFormatCombo->currentIndex()));
job->setPreview(preview);
if (temperatureIN->isEnabled())
......@@ -2486,6 +2484,10 @@ bool Capture::processJobInfo(XMLEle *root)
if (ISOCombo->isEnabled())
ISOCombo->setCurrentIndex(atoi(pcdataXMLEle(ep)));
}
else if (!strcmp(tagXMLEle(ep), "FormatIndex"))
{
transferFormatCombo->setCurrentIndex(atoi(pcdataXMLEle(ep)));
}
else if (!strcmp(tagXMLEle(ep), "Calibration"))
{
subEP = findXMLEle(ep, "FlatSource");
......@@ -2687,6 +2689,7 @@ bool Capture::saveSequenceQueue(const QString &path)
outstream << "<RemoteDirectory>" << job->getRemoteDir() << "</RemoteDirectory>" << endl;
if (job->getISOIndex() != -1)
outstream << "<ISOIndex>" << (job->getISOIndex()) << "</ISOIndex>" << endl;
outstream << "<FormatIndex>" << (job->getTransforFormat()) << "</FormatIndex>" << endl;
outstream << "<Calibration>" << endl;
outstream << "<FlatSource>" << endl;
......@@ -2796,6 +2799,8 @@ void Capture::syncGUIToJob(SequenceJob *job)
if (ISOCombo->isEnabled())
ISOCombo->setCurrentIndex(job->getISOIndex());
transferFormatCombo->setCurrentIndex(job->getTransforFormat());
}
void Capture::editJob(QModelIndex i)
......
......@@ -597,8 +597,6 @@ private:
int16_t lastFilterOffset=0;
QList<OAL::Filter *> m_filterList;
int lastDSLRTransforFormat=-1;
};
}
......
This diff is collapsed.
......@@ -424,6 +424,16 @@ void SequenceJob::setRemoteDir(const QString &value)
remoteDir = value;
}
ISD::CCD::TransferFormat SequenceJob::getTransforFormat() const
{
return transforFormat;
}
void SequenceJob::setTransforFormat(const ISD::CCD::TransferFormat &value)
{
transforFormat = value;
}
int SequenceJob::getISOIndex() const
{
return isoIndex;
......
......@@ -154,6 +154,9 @@ class SequenceJob : public QObject
QString getRemoteDir() const;
void setRemoteDir(const QString &value);
ISD::CCD::TransferFormat getTransforFormat() const;
void setTransforFormat(const ISD::CCD::TransferFormat &value);
signals:
void prepareComplete();
void checkFocus();
......@@ -188,11 +191,13 @@ private:
QTableWidgetItem *statusCell;
QString fitsDir;
QString rootFITSDir;
QString postCaptureScript;
QString postCaptureScript;
//TODO getters and setters
ISD::CCD::UploadMode uploadMode = ISD::CCD::UPLOAD_CLIENT;
// Transfer Format
ISD::CCD::TransferFormat transforFormat = ISD::CCD::FORMAT_FITS;
// TODO getters and settings
QString remoteDir;
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>356</width>
<height>366</height>
<width>361</width>
<height>321</height>
</rect>
</property>
<property name="windowTitle">
......@@ -188,6 +188,29 @@
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="toolTip">
<string>Maximum acceptable difference between requested and measured temperature set point. When the temperature threshold is below this value, the temperature set point request is deemed successful.</string>
</property>
<property name="text">
<string>Temperature Threshold:</string>
</property>
</widget>
</item>
<item row="0" column="5">
<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="0" column="2" colspan="2">
<widget class="QDoubleSpinBox" name="kcfg_MaxTemperatureDiff">
<property name="minimum">
......@@ -204,16 +227,6 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the format of captured DSLR images within the Capture Module.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>DSLR Format:</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="label_5">
<property name="toolTip">
......@@ -224,23 +237,6 @@
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label_3">
<property name="text">
<string>° C</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="toolTip">
<string>Maximum acceptable difference between requested and measured temperature set point. When the temperature threshold is below this value, the temperature set point request is deemed successful.</string>
</property>
<property name="text">
<string>Temperature Threshold:</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<widget class="QDoubleSpinBox" name="kcfg_HFRThresholdPercentage">
<property name="maximum">
......@@ -248,10 +244,17 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QRadioButton" name="kcfg_DSLRFormatFITS">
<item row="1" column="4">
<widget class="QLabel" name="label_9">
<property name="text">
<string>FITS</string>
<string>%</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label_3">
<property name="text">
<string>° C</string>
</property>
</widget>
</item>
......@@ -262,25 +265,22 @@
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QLabel" name="label_9">
<item row="2" column="1">
<widget class="QRadioButton" name="kcfg_DSLRFormatFITS">
<property name="text">
<string>%</string>
<string>FITS</string>
</property>
</widget>
</item>
<item row="0" column="5">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the format of captured DSLR images within the Capture Module.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<property name="text">
<string>DSLR Format:</string>
</property>
</spacer>
</widget>
</item>
</layout>
</item>
......
......@@ -1459,14 +1459,6 @@
<label>When starting a new capture job, check if files were previously captured and resume capture afterwards.</label>
<default>true</default>
</entry>
<entry name="DSLRFormatFITS" type="Bool">
<label>Enforce FITS format when capturing from DSLR camera.</label>
<default>true</default>
</entry>
<entry name="DSLRFormatNative" type="Bool">
<label>Enforce native format when capturing from DSLR camera.</label>
<default>false</default>
</entry>
<entry name="HFRThresholdPercentage" type="Double">
<label>Increase autofocus HFR value by this percentage gain and store it in Capture Module.</label>
<default>2.5</default>
......@@ -1583,11 +1575,6 @@
<whatsthis>Automatically update the solver RA and Declination coordinates after telescope slew is completed.</whatsthis>
<default>true</default>
</entry>
<entry name="SolverPreview" type="Bool">
<label>Display image in FITS Viewer.</label>
<whatsthis>Display captured image in FITS Viewer before starting the plate solving process.</whatsthis>
<default>false</default>
</entry>
<entry name="SolverVerbose" type="Bool">
<whatsthis>Display detailed verbose messages of the astrometry solver process while in progress.</whatsthis>
<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