summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-07-16 12:24:11 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-07-16 12:24:11 (GMT)
commit2b20c994a3ae695aadc005103b7a667d4747f931 (patch)
tree3a71f75eeccc784f256fa02cc534aae66a592410
parent72d38401448b21ce051c68e96d5afa4189951dab (diff)
Improve summary screen
-rw-r--r--kstars/CMakeLists.txt6
-rw-r--r--kstars/ekos/capture.cpp92
-rw-r--r--kstars/ekos/capture.h27
-rw-r--r--kstars/ekos/ekos.cpp7
-rw-r--r--kstars/ekos/ekos.h28
-rw-r--r--kstars/ekos/ekosmanager.cpp532
-rw-r--r--kstars/ekos/ekosmanager.h42
-rw-r--r--kstars/ekos/ekosmanager.ui1791
-rw-r--r--kstars/ekos/focus.cpp122
-rw-r--r--kstars/ekos/focus.h11
-rw-r--r--kstars/ekos/guide.cpp145
-rw-r--r--kstars/ekos/guide.h15
-rw-r--r--kstars/ekos/guide/gmath.cpp10
-rw-r--r--kstars/ekos/guide/guider.cpp20
-rw-r--r--kstars/ekos/guide/guider.h5
-rw-r--r--kstars/ekos/guide/rcalibration.cpp61
-rw-r--r--kstars/ekos/guide/rcalibration.h3
-rw-r--r--kstars/ekos/phd2.cpp10
-rw-r--r--kstars/ekos/phd2.h5
-rw-r--r--kstars/fitsviewer/fitsviewer.h2
-rw-r--r--kstars/indi/indiccd.cpp4
-rw-r--r--kstars/org.kde.kstars.Ekos.Capture.xml9
22 files changed, 1966 insertions, 981 deletions
diff --git a/kstars/CMakeLists.txt b/kstars/CMakeLists.txt
index 2d8d9db..cd854e6 100644
--- a/kstars/CMakeLists.txt
+++ b/kstars/CMakeLists.txt
@@ -102,9 +102,10 @@ if(INDI_FOUND)
)
set(ekos_SRCS
+ ekos/ekos.cpp
ekos/schedulerjob.cpp
ekos/scheduler.cpp
- ekos/mosaic.cpp
+ ekos/mosaic.cpp
ekos/ekosmanager.cpp
ekos/capture.cpp
ekos/sequencejob.cpp
@@ -658,7 +659,4 @@ install(TARGETS kstars ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
install(PROGRAMS org.kde.kstars.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES kstars.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
-#install(FILES kstars.knsrc DESTINATION ${KDE_INSTALL_CONFDIR})
-#install(FILES kstarsui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kstars)
-#install(FILES fitsviewer.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kstars)
install(FILES kstars.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
diff --git a/kstars/ekos/capture.cpp b/kstars/ekos/capture.cpp
index 0cd1f5e..e665aea 100644
--- a/kstars/ekos/capture.cpp
+++ b/kstars/ekos/capture.cpp
@@ -321,6 +321,8 @@ void Capture::start()
}
}*/
+ emit newStatus(Ekos::CAPTURE_PROGRESS);
+
prepareJob(first_job);
}
@@ -344,7 +346,7 @@ void Capture::abort()
{
KNotification::event( QLatin1String( "CaptureFailed"), i18n("CCD capture failed with errors") );
activeJob->abort();
- emit newStatus(i18n("Aborted"), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_ABORTED);
}
activeJob->reset();
@@ -365,7 +367,7 @@ void Capture::abort()
secondsLabel->clear();
//currentCCD->disconnect(this);
disconnect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
- disconnect(currentCCD, SIGNAL(newImage(QImage*)), this, SIGNAL(newImage(QImage*)));
+ disconnect(currentCCD, SIGNAL(newImage(QImage*)), this, SLOT(sendNewImage(QImage*)));
disconnect(currentCCD, SIGNAL(newExposureValue(ISD::CCDChip*,double, IPState)), this, SLOT(updateCaptureProgress(ISD::CCDChip*,double,IPState)));
currentCCD->setFITSDir("");
@@ -383,6 +385,12 @@ void Capture::abort()
}
+void Capture::sendNewImage(QImage *image)
+{
+ if (activeJob)
+ emit newImage(image, activeJob);
+}
+
bool Capture::setCCD(QString device)
{
for (int i=0; i < CCDCaptureCombo->count(); i++)
@@ -743,7 +751,7 @@ void Capture::startNextExposure()
if (seqDelay > 0)
{
secondsLabel->setText(i18n("Waiting..."));
- emit newStatus(i18n("Waiting..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_WAITING);
}
seqTimer->start(seqDelay);
@@ -786,7 +794,7 @@ void Capture::newFITS(IBLOB *bp)
return;
disconnect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
- disconnect(currentCCD, SIGNAL(newImage(QImage*)), this, SIGNAL(newImage(QImage*)));
+ disconnect(currentCCD, SIGNAL(newImage(QImage*)), this, SLOT(sendNewImage(QImage*)));
if (calibrationState == CALIBRATE_START)
{
@@ -842,7 +850,7 @@ void Capture::newFITS(IBLOB *bp)
appendLogText(i18n("Received image %1 out of %2.", seqCurrentCount, seqTotalCount));
- emit newStatus(i18n("Image received..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_IMAGE_RECEIVED);
currentImgCountOUT->setText( QString::number(seqCurrentCount));
@@ -878,7 +886,7 @@ void Capture::processJobCompletion()
{
KNotification::event( QLatin1String( "CaptureSuccessful"), i18n("CCD capture sequence completed"));
- emit newStatus(i18n("Complete"), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_COMPLETE);
if (parkCheck->isChecked() && currentTelescope && currentTelescope->canPark())
{
@@ -946,14 +954,14 @@ bool Capture::resumeSequence()
secondsLabel->setText(i18n("Dithering..."));
emit exposureComplete();
- emit newStatus(i18n("Dithering..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_DITHERING);
}
else if (isAutoFocus && activeJob->getFrameType() == FRAME_LIGHT)
{
secondsLabel->setText(i18n("Focusing..."));
emit checkFocus(HFRPixels->value());
- emit newStatus(i18n("Focusing..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_FOCUSING);
}
else
startNextExposure();
@@ -1006,7 +1014,7 @@ void Capture::captureImage()
}
connect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)), Qt::UniqueConnection);
- connect(currentCCD, SIGNAL(newImage(QImage*)), this, SIGNAL(newImage(QImage*)), Qt::UniqueConnection);
+ connect(currentCCD, SIGNAL(newImage(QImage*)), this, SLOT(sendNewImage(QImage*)), Qt::UniqueConnection);
if (activeJob->getFrameType() == FRAME_FLAT)
{
@@ -1021,7 +1029,8 @@ void Capture::captureImage()
if (currentCCD->getUploadMode() != ISD::CCD::UPLOAD_LOCAL)
checkSeqBoundary(activeJob->getFITSDir());
- emit newStatus(i18n("Capturing..."), getProgressPercentage());
+ if (activeJob->isPreview() == false)
+ emit newStatus(Ekos::CAPTURE_CAPTURING);
rc = activeJob->capture(isDark);
@@ -1069,7 +1078,7 @@ void Capture::resumeCapture()
{
secondsLabel->setText(i18n("Focusing..."));
emit checkFocus(HFRPixels->value());
- emit newStatus(i18n("Focusing..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_FOCUSING);
return;
}
@@ -1579,7 +1588,7 @@ void Capture::prepareJob(SequenceJob *job)
appendLogText(i18n("Changing filter to %1...", FilterPosCombo->itemText(activeJob->getTargetFilter()-1)));
secondsLabel->setText(i18n("Set filter..."));
- emit newStatus(i18n("Changing filter..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_CHANGING_FILTER);
setBusy(true);
@@ -1594,7 +1603,7 @@ void Capture::prepareJob(SequenceJob *job)
appendLogText(i18n("Setting temperature to %1 C...", activeJob->getTargetTemperature()));
secondsLabel->setText(i18n("Set %1 C...", activeJob->getTargetTemperature()));
- emit newStatus(i18n("Setting temperature..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_SETTING_TEMPERATURE);
setBusy(true);
}
@@ -2457,6 +2466,20 @@ double Capture::getProgressPercentage()
return -1;
}
+int Capture::getActiveJobID()
+{
+ if (activeJob == NULL)
+ return -1;
+
+ for (int i=0; i < jobs.count(); i++)
+ {
+ if (activeJob == jobs[i])
+ return i;
+ }
+
+ return -1;
+}
+
QString Capture::getJobState(int id)
{
if (id < jobs.count())
@@ -2512,6 +2535,36 @@ double Capture::getJobExposureDuration(int id)
return -1;
}
+int Capture::getJobRemainingTime(SequenceJob *job)
+{
+ int remaining=0;
+
+ if (job->getStatus() == SequenceJob::JOB_BUSY)
+ remaining += (job->getExposure() + job->getDelay()) * (job->getCount() - job->getCompleted()) + job->getExposeLeft();
+ else
+ remaining += (job->getExposure() + job->getDelay()) * (job->getCount() - job->getCompleted());
+
+ return remaining;
+}
+
+int Capture::getOverallRemainingTime()
+{
+ double remaining=0;
+
+ foreach(SequenceJob *job, jobs)
+ remaining += getJobRemainingTime(job);
+
+ return remaining;
+}
+
+int Capture::getActiveJobRemainingTime()
+{
+ if (activeJob == NULL)
+ return -1;
+
+ return getJobRemainingTime(activeJob);
+}
+
void Capture::setMaximumGuidingDeviaiton(bool enable, double value)
{
if (guideDeviationCheck->isEnabled())
@@ -2548,7 +2601,7 @@ void Capture::setTemperature()
void Capture::clearSequenceQueue()
{
activeJob=NULL;
- abort();
+ abort();
while (queueTable->rowCount() > 0)
queueTable->removeRow(0);
jobs.clear();
@@ -2595,7 +2648,7 @@ QString Capture::getSequenceQueueStatus()
if (aborted > 0)
{
if (isAutoGuiding && deviationDetected)
- return "Suspended";
+ return "Suspended";
else
return "Aborted";
}
@@ -2658,7 +2711,7 @@ void Capture::processTelescopeNumber(INumberVectorProperty *nvp)
appendLogText(i18n("Performing post flip re-alignment..."));
secondsLabel->setText(i18n("Aligning..."));
- emit newStatus(i18n("Aligning..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_ALIGNING);
meridianFlipStage = MF_ALIGNING;
emit meridialFlipTracked();
@@ -2688,7 +2741,7 @@ void Capture::checkGuidingAfterFlip()
appendLogText(i18n("Performing post flip re-calibration and guiding..."));
secondsLabel->setText(i18n("Calibrating..."));
- emit newStatus(i18n("Calibrating..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_CALIBRATING);
meridianFlipStage = MF_GUIDING;
emit meridianFlipCompleted();
@@ -2755,7 +2808,7 @@ bool Capture::checkMeridianFlip()
currentTelescope->Slew(initialRA,dec);
secondsLabel->setText(i18n("Meridian Flip..."));
- emit newStatus(i18n("Meridian Flip..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_MERIDIAN_FLIP);
QTimer::singleShot(MF_TIMER_TIMEOUT, this, SLOT(checkMeridianFlipTimeout()));
return true;
@@ -3405,7 +3458,7 @@ void Capture::startPostFilterAutoFocus()
secondsLabel->setText(i18n("Focusing..."));
- emit newStatus(i18n("Focusing..."), getProgressPercentage());
+ emit newStatus(Ekos::CAPTURE_FOCUSING);
appendLogText(i18n("Post filter change Autofocus..."));
@@ -3413,4 +3466,5 @@ void Capture::startPostFilterAutoFocus()
emit checkFocus(0.1);
}
+
}
diff --git a/kstars/ekos/capture.h b/kstars/ekos/capture.h
index dc78808..85d9739 100644
--- a/kstars/ekos/capture.h
+++ b/kstars/ekos/capture.h
@@ -16,6 +16,7 @@
#include "ui_capture.h"
+#include "ekos.h"
#include "fitsviewer/fitscommon.h"
#include "indi/indistd.h"
#include "indi/indiccd.h"
@@ -182,6 +183,21 @@ public:
Q_SCRIPTABLE int getJobCount() { return jobs.count(); }
/** DBUS interface function.
+ * @return Returns ID of current active job if any, or -1 if there are no active jobs.
+ */
+ Q_SCRIPTABLE int getActiveJobID();
+
+ /** DBUS interface function.
+ * @return Returns time left in seconds until active job is estimated to be complete.
+ */
+ int getActiveJobRemainingTime();
+
+ /** DBUS interface function.
+ * @return Returns overall time left in seconds until all jobs are estimated to be complete
+ */
+ int getOverallRemainingTime();
+
+ /** DBUS interface function.
* @param id job number. Job IDs start from 0 to N-1.
* @return Returns the job state (Idle, In Progress, Error, Aborted, Complete)
*/
@@ -367,7 +383,6 @@ private slots:
void resetFrame();
void updateCaptureProgress(ISD::CCDChip *tChip, double value, IPState state);
void checkSeqBoundary(const QString &path);
- //void checkSeqFile(const QString &path);
void saveFITSDirectory();
void setDefaultCCD(QString ccd);
void setNewRemoteFile(QString file);
@@ -400,6 +415,9 @@ private slots:
IPState processPreCaptureCalibrationStage();
bool processPostCaptureCalibrationStage();
+ // Send image info
+ void sendNewImage(QImage *image);
+
signals:
void newLog();
void exposureComplete();
@@ -409,8 +427,8 @@ signals:
void meridianFlipStarted();
void meridialFlipTracked();
void meridianFlipCompleted();
- void newStatus(const QString status, double progress);
- void newImage(QImage *image);
+ void newStatus(Ekos::CaptureState status);
+ void newImage(QImage *image, Ekos::SequenceJob *job);
private:
@@ -432,6 +450,9 @@ private:
void checkGuidingAfterFlip();
double getCurrentHA();
+ // Remaining Time in seconds
+ int getJobRemainingTime(SequenceJob *job);
+
/* Capture */
double seqExpose;
int seqTotalCount;
diff --git a/kstars/ekos/ekos.cpp b/kstars/ekos/ekos.cpp
new file mode 100644
index 0000000..7650344
--- /dev/null
+++ b/kstars/ekos/ekos.cpp
@@ -0,0 +1,7 @@
+#include "ekos.h"
+
+namespace Ekos
+{
+ const QString & getGuideStatusString(GuideState state) { return guideStates[state]; }
+ const QString & getCaptureStatusString(CaptureState state) { return captureStates[state]; }
+}
diff --git a/kstars/ekos/ekos.h b/kstars/ekos/ekos.h
new file mode 100644
index 0000000..4d6048c
--- /dev/null
+++ b/kstars/ekos/ekos.h
@@ -0,0 +1,28 @@
+#ifndef EKOS_H
+#define EKOS_H
+
+#include <KLocalizedString>
+
+namespace Ekos
+{
+ static const QStringList guideStates = { I18N_NOOP("Idle"), I18N_NOOP("Calibrating"), I18N_NOOP("Calibration successful"), I18N_NOOP("Calibration error"), I18N_NOOP("Guiding"),
+ I18N_NOOP("Aborted"), I18N_NOOP("Suspended"), I18N_NOOP("Dithering"), I18N_NOOP("Dithering Successful"), I18N_NOOP("Dithering error")};
+
+ typedef enum { GUIDE_IDLE, GUIDE_CALIBRATING, GUIDE_CALIBRATION_SUCESS, GUIDE_CALIBRATION_ERROR, GUIDE_GUIDING,
+ GUIDE_ABORTED, GUIDE_SUSPENDED, GUIDE_DITHERING, GUIDE_DITHERING_SUCCESS, GUIDE_DITHERING_ERROR } GuideState;
+
+ const QString & getGuideStatusString(GuideState state);
+
+ static const QStringList captureStates = { I18N_NOOP("Idle"), I18N_NOOP("In Progress"), I18N_NOOP("Capturing"), I18N_NOOP("Aborted"), I18N_NOOP("Waiting"), I18N_NOOP("Image Received"),
+ I18N_NOOP("Dithering"), I18N_NOOP("Focusing"), I18N_NOOP("Changing Filter"), I18N_NOOP("Setting Temperature"), I18N_NOOP("Aligning"),
+ I18N_NOOP("Calibrating"), I18N_NOOP("Meridian Flip"), I18N_NOOP("Complete") };
+
+ typedef enum { CAPTURE_IDLE, CAPTURE_PROGRESS, CAPTURE_CAPTURING, CAPTURE_ABORTED, CAPTURE_WAITING, CAPTURE_IMAGE_RECEIVED, CAPTURE_DITHERING, CAPTURE_FOCUSING,
+ CAPTURE_CHANGING_FILTER, CAPTURE_SETTING_TEMPERATURE, CAPTURE_ALIGNING, CAPTURE_CALIBRATING, CAPTURE_MERIDIAN_FLIP, CAPTURE_COMPLETE } CaptureState;
+
+
+ const QString &getCaptureStatusString(CaptureState state);
+
+}
+
+#endif // EKOS_H
diff --git a/kstars/ekos/ekosmanager.cpp b/kstars/ekos/ekosmanager.cpp
index 98a8ef2..1a1c68d 100644
--- a/kstars/ekos/ekosmanager.cpp
+++ b/kstars/ekos/ekosmanager.cpp
@@ -25,6 +25,8 @@
#include "auxiliary/ksuserdb.h"
#include "fitsviewer/fitsviewer.h"
+#include "sequencejob.h"
+
#include "profileeditor.h"
#include "profileinfo.h"
#include "QProgressIndicator.h"
@@ -44,7 +46,7 @@
#define MAX_LOCAL_INDI_TIMEOUT 5000
EkosManager::EkosManager()
- : QDialog(KStars::Instance())
+ : QDialog(KStars::Instance())
{
setupUi(this);
@@ -76,9 +78,15 @@ EkosManager::EkosManager()
ekosOption = NULL;
- mountPI=capturePI=NULL;
+ focusStarPixmap=focusProfilePixmap=guideStarPixmap=guideProfilePixmap=NULL;
+
+ mountPI=capturePI=focusPI=guidePI=NULL;
captureProgress->setValue(0);
+ sequenceProgress->setValue(0);
+ sequenceProgress->setFormat("%v");
+ countdownTimer.setInterval(1000);
+ connect(&countdownTimer, SIGNAL(timeout()), this, SLOT(updateCaptureCountDown()));
toolsWidget->setIconSize(QSize(64,64));
connect(toolsWidget, SIGNAL(currentChanged(int)), this, SLOT(processTabChange()));
@@ -100,6 +108,13 @@ EkosManager::EkosManager()
// Clear Ekos Log
connect(clearB, SIGNAL(clicked()), this, SLOT(clearLog()));
+ // Summary
+ previewPixmap = new QPixmap(QPixmap(":/images/noimage.png"));
+ focusStarFile.open();
+ focusProfileFile.open();
+ guideStarFile.open();
+ guideProfileFile.open();
+
// Profiles
connect(addProfileB, SIGNAL(clicked()), this, SLOT(addProfile()));
connect(editProfileB, SIGNAL(clicked()), this, SLOT(editProfile()));
@@ -165,6 +180,20 @@ void EkosManager::showEvent(QShowEvent * /*event*/)
a->setChecked(true);
}
+void EkosManager::resizeEvent(QResizeEvent *)
+{
+ previewImage->setPixmap(previewPixmap->scaled(previewImage->width(), previewImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+ if (focusStarPixmap)
+ focusStarImage->setPixmap(focusStarPixmap->scaled(focusStarImage->width(), focusStarImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+ if (focusProfilePixmap)
+ focusProfileImage->setPixmap(focusProfilePixmap->scaled(focusProfileImage->width(), focusProfileImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+ if (guideStarPixmap)
+ guideStarImage->setPixmap(guideStarPixmap->scaled(guideStarImage->width(), guideStarImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+ if (guideProfilePixmap)
+ guideProfileImage->setPixmap(guideProfilePixmap->scaled(guideProfileImage->width(), guideProfileImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+
+}
+
void EkosManager::loadProfiles()
{
profiles = KStarsData::Instance()->userdb()->GetAllProfiles();
@@ -236,6 +265,28 @@ void EkosManager::reset()
controlPanelB->setEnabled(false);
processINDIB->setEnabled(true);
+ mountGroup->setEnabled(false);
+ focusGroup->setEnabled(false);
+ captureGroup->setEnabled(false);
+ guideGroup->setEnabled(false);
+ sequenceLabel->setText(i18n("Sequence"));
+ sequenceProgress->setValue(0);
+ captureProgress->setValue(0);
+ overallRemainingTime->setText("--:--:--");
+ sequenceRemainingTime->setText("--:--:--");
+ mountStatus->setText(i18n("Idle"));
+ captureStatus->setText(i18n("Idle"));
+ focusStatus->setText(i18n("Idle"));
+ guideStatus->setText(i18n("Idle"));
+ if (capturePI)
+ capturePI->stopAnimation();
+ if (mountPI)
+ mountPI->stopAnimation();
+ if (focusPI)
+ focusPI->stopAnimation();
+ if (guidePI)
+ guidePI->stopAnimation();
+
processINDIB->setText(i18n("Start INDI"));
}
@@ -294,21 +345,21 @@ bool EkosManager::start()
{
haveGuider = true;
- // If the guider and ccd are the same driver, we have two cases:
- // #1 Drivers that only support ONE device per driver (such as sbig)
- // #2 Drivers that supports multiples devices per driver (such as sx)
- // For #1, we modify guider_di to make a unique label for the other device with postfix "Guide"
- // For #2, we set guider_di to NULL and we prompt the user to select which device is primary ccd and which is guider
- // since this is the only way to find out in real time.
- if (haveCCD && currentProfile->guider() == currentProfile->ccd())
+ // If the guider and ccd are the same driver, we have two cases:
+ // #1 Drivers that only support ONE device per driver (such as sbig)
+ // #2 Drivers that supports multiples devices per driver (such as sx)
+ // For #1, we modify guider_di to make a unique label for the other device with postfix "Guide"
+ // For #2, we set guider_di to NULL and we prompt the user to select which device is primary ccd and which is guider
+ // since this is the only way to find out in real time.
+ if (haveCCD && currentProfile->guider() == currentProfile->ccd())
+ {
+ if (drv->getAuxInfo().value("mdpd", false).toBool() == true)
+ drv = NULL;
+ else
{
- if (drv->getAuxInfo().value("mdpd", false).toBool() == true)
- drv = NULL;
- else
- {
- drv->setUniqueLabel(drv->getTreeLabel() + " Guide");
- }
+ drv->setUniqueLabel(drv->getTreeLabel() + " Guide");
}
+ }
if (drv)
managedDrivers.append(drv->clone());
@@ -647,7 +698,7 @@ void EkosManager::processNewDevice(ISD::GDInterface *devInterface)
genericDevices.append(devInterface);
- nDevices--;
+ nDevices--;
connect(devInterface, SIGNAL(Connected()), this, SLOT(deviceConnected()));
connect(devInterface, SIGNAL(Disconnected()), this, SLOT(deviceDisconnected()));
@@ -723,7 +774,7 @@ void EkosManager::deviceConnected()
{
ISwitchVectorProperty *configProp = device->getBaseDevice()->getSwitch("CONFIG_PROCESS");
if (configProp && configProp->s == IPS_IDLE)
- device->setConfig(tConfig);
+ device->setConfig(tConfig);
break;
}
}
@@ -864,27 +915,27 @@ void EkosManager::setCCD(ISD::GDInterface *ccdDevice)
if (Options::defaultGuideCCD().isEmpty() == false)
rc = guideProcess->setCCD(Options::defaultGuideCCD());
if (rc == false && guiderCCD.isEmpty() == false)
- guideProcess->setCCD(guiderCCD);
+ guideProcess->setCCD(guiderCCD);
appendLogText(i18n("%1 is online.", ccdDevice->getDeviceName()));
connect(ccdDevice, SIGNAL(numberUpdated(INumberVectorProperty*)), this, SLOT(processNewNumber(INumberVectorProperty*)), Qt::UniqueConnection);
- if (managedDevices.contains(KSTARS_TELESCOPE))
- {
- alignProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
- captureProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
- guideProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
- }
+ if (managedDevices.contains(KSTARS_TELESCOPE))
+ {
+ alignProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
+ captureProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
+ guideProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
+ }
}
void EkosManager::setFilter(ISD::GDInterface *filterDevice)
{
- managedDevices.insertMulti(KSTARS_FILTER, filterDevice);
+ managedDevices.insertMulti(KSTARS_FILTER, filterDevice);
- appendLogText(i18n("%1 filter is online.", filterDevice->getDeviceName()));
+ appendLogText(i18n("%1 filter is online.", filterDevice->getDeviceName()));
initCapture();
@@ -959,16 +1010,16 @@ void EkosManager::removeDevice(ISD::GDInterface* devInterface)
{
switch (devInterface->getType())
{
- case KSTARS_CCD:
+ case KSTARS_CCD:
removeTabs();
break;
case KSTARS_FOCUSER:
- break;
+ break;
- default:
- break;
+ default:
+ break;
}
appendLogText(i18n("%1 is offline.", devInterface->getDeviceName()));
@@ -1005,8 +1056,8 @@ void EkosManager::processNewNumber(INumberVectorProperty *nvp)
{
if (guideProcess)
{
- guideProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
- guideProcess->syncTelescopeInfo();
+ guideProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
+ guideProcess->syncTelescopeInfo();
}
if (alignProcess)
@@ -1017,8 +1068,8 @@ void EkosManager::processNewNumber(INumberVectorProperty *nvp)
if (mountProcess)
{
- mountProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
- mountProcess->syncTelescopeInfo();
+ mountProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
+ mountProcess->syncTelescopeInfo();
}
return;
@@ -1070,8 +1121,8 @@ void EkosManager::processNewProperty(INDI::Property* prop)
{
if (guideProcess)
{
- guideProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
- guideProcess->syncTelescopeInfo();
+ guideProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
+ guideProcess->syncTelescopeInfo();
}
if (alignProcess)
@@ -1082,8 +1133,8 @@ void EkosManager::processNewProperty(INDI::Property* prop)
if (mountProcess)
{
- mountProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
- mountProcess->syncTelescopeInfo();
+ mountProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
+ mountProcess->syncTelescopeInfo();
}
return;
@@ -1095,18 +1146,18 @@ void EkosManager::processNewProperty(INDI::Property* prop)
{
if (!strcmp(device->getDeviceName(), prop->getDeviceName()))
{
- initCapture();
- initGuide();
- useGuideHead=true;
- captureProcess->addGuideHead(device);
- guideProcess->addGuideHead(device);
-
- bool rc = false;
- if (Options::defaultGuideCCD().isEmpty() == false)
- rc = guideProcess->setCCD(Options::defaultGuideCCD());
- if (rc == false)
- guideProcess->setCCD(QString(device->getDeviceName()) + QString(" Guider"));
- return;
+ initCapture();
+ initGuide();
+ useGuideHead=true;
+ captureProcess->addGuideHead(device);
+ guideProcess->addGuideHead(device);
+
+ bool rc = false;
+ if (Options::defaultGuideCCD().isEmpty() == false)
+ rc = guideProcess->setCCD(Options::defaultGuideCCD());
+ if (rc == false)
+ guideProcess->setCCD(QString(device->getDeviceName()) + QString(" Guider"));
+ return;
}
}
@@ -1229,7 +1280,7 @@ void EkosManager::updateLog()
ekosLogOut->setPlainText(guideProcess->getLogText());
else if (currentWidget == mountProcess)
ekosLogOut->setPlainText(mountProcess->getLogText());
- if (currentWidget == schedulerProcess)
+ if (currentWidget == schedulerProcess)
ekosLogOut->setPlainText(schedulerProcess->getLogText());
@@ -1275,51 +1326,54 @@ void EkosManager::initCapture()
if (captureProcess)
return;
- captureProcess = new Ekos::Capture();
- int index = toolsWidget->addTab( captureProcess, QIcon(":/icons/ekos_ccd.png"), "");
- toolsWidget->tabBar()->setTabToolTip(index, i18nc("Charge-Coupled Device", "CCD"));
- connect(captureProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
- connect(captureProcess, SIGNAL(newStatus(QString,double)), this, SLOT(updateCaptureStatus(QString,double)));
- connect(captureProcess, SIGNAL(newImage(QImage*)), this, SLOT(updateCaptureImage(QImage*)));
-
- capturePI = new QProgressIndicator(captureProcess);
- captureStatusLayout->addWidget(capturePI);
-
- foreach(ISD::GDInterface *device, findDevices(KSTARS_AUXILIARY))
- {
- if (device->getBaseDevice()->getDriverInterface() & INDI::BaseDevice::DUSTCAP_INTERFACE)
- captureProcess->setDustCap(device);
- if (device->getBaseDevice()->getDriverInterface() & INDI::BaseDevice::LIGHTBOX_INTERFACE)
- captureProcess->setLightBox(device);
- }
-
- if (focusProcess)
- {
- // Autofocus
- connect(captureProcess, SIGNAL(checkFocus(double)), focusProcess, SLOT(checkFocus(double)), Qt::UniqueConnection);
- connect(focusProcess, SIGNAL(autoFocusFinished(bool, double)), captureProcess, SLOT(updateAutofocusStatus(bool, double)), Qt::UniqueConnection);
- connect(focusProcess, SIGNAL(statusUpdated(bool)), captureProcess, SLOT(updateFocusStatus(bool)), Qt::UniqueConnection);
-
- // Meridian Flip
- connect(captureProcess, SIGNAL(meridianFlipStarted()), focusProcess, SLOT(resetFocusFrame()), Qt::UniqueConnection);
- }
-
- if (alignProcess)
- {
- // Alignment flag
- connect(alignProcess, SIGNAL(solverComplete(bool)), captureProcess, SLOT(enableAlignmentFlag()), Qt::UniqueConnection);
- connect(alignProcess, SIGNAL(solverSlewComplete()), captureProcess, SLOT(checkAlignmentSlewComplete()), Qt::UniqueConnection);
-
- // Meridian Flip
- connect(captureProcess, SIGNAL(meridialFlipTracked()), alignProcess, SLOT(captureAndSolve()), Qt::UniqueConnection);
- }
-
- if (mountProcess)
- {
- // Meridian Flip
- connect(captureProcess, SIGNAL(meridianFlipStarted()), mountProcess, SLOT(disableAltLimits()), Qt::UniqueConnection);
- connect(captureProcess, SIGNAL(meridianFlipCompleted()), mountProcess, SLOT(enableAltLimits()), Qt::UniqueConnection);
- }
+ captureProcess = new Ekos::Capture();
+ int index = toolsWidget->addTab( captureProcess, QIcon(":/icons/ekos_ccd.png"), "");
+ toolsWidget->tabBar()->setTabToolTip(index, i18nc("Charge-Coupled Device", "CCD"));
+ connect(captureProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
+ connect(captureProcess, SIGNAL(newStatus(Ekos::CaptureState)), this, SLOT(updateCaptureStatus(Ekos::CaptureState)));
+ connect(captureProcess, SIGNAL(newImage(QImage*, Ekos::SequenceJob*)), this, SLOT(updateCaptureImage(QImage*, Ekos::SequenceJob*)));
+ captureGroup->setEnabled(true);
+ sequenceProgress->setEnabled(true);
+ captureProgress->setEnabled(true);
+
+ capturePI = new QProgressIndicator(captureProcess);
+ captureStatusLayout->addWidget(capturePI);
+
+ foreach(ISD::GDInterface *device, findDevices(KSTARS_AUXILIARY))
+ {
+ if (device->getBaseDevice()->getDriverInterface() & INDI::BaseDevice::DUSTCAP_INTERFACE)
+ captureProcess->setDustCap(device);
+ if (device->getBaseDevice()->getDriverInterface() & INDI::BaseDevice::LIGHTBOX_INTERFACE)
+ captureProcess->setLightBox(device);
+ }
+
+ if (focusProcess)
+ {
+ // Autofocus
+ connect(captureProcess, SIGNAL(checkFocus(double)), focusProcess, SLOT(checkFocus(double)), Qt::UniqueConnection);
+ connect(focusProcess, SIGNAL(autoFocusFinished(bool, double)), captureProcess, SLOT(updateAutofocusStatus(bool, double)), Qt::UniqueConnection);
+ connect(focusProcess, SIGNAL(statusUpdated(bool)), captureProcess, SLOT(updateFocusStatus(bool)), Qt::UniqueConnection);
+
+ // Meridian Flip
+ connect(captureProcess, SIGNAL(meridianFlipStarted()), focusProcess, SLOT(resetFocusFrame()), Qt::UniqueConnection);
+ }
+
+ if (alignProcess)
+ {
+ // Alignment flag
+ connect(alignProcess, SIGNAL(solverComplete(bool)), captureProcess, SLOT(enableAlignmentFlag()), Qt::UniqueConnection);
+ connect(alignProcess, SIGNAL(solverSlewComplete()), captureProcess, SLOT(checkAlignmentSlewComplete()), Qt::UniqueConnection);
+
+ // Meridian Flip
+ connect(captureProcess, SIGNAL(meridialFlipTracked()), alignProcess, SLOT(captureAndSolve()), Qt::UniqueConnection);
+ }
+
+ if (mountProcess)
+ {
+ // Meridian Flip
+ connect(captureProcess, SIGNAL(meridianFlipStarted()), mountProcess, SLOT(disableAltLimits()), Qt::UniqueConnection);
+ connect(captureProcess, SIGNAL(meridianFlipCompleted()), mountProcess, SLOT(enableAltLimits()), Qt::UniqueConnection);
+ }
}
@@ -1328,27 +1382,27 @@ void EkosManager::initAlign()
if (alignProcess)
return;
- alignProcess = new Ekos::Align();
- int index = toolsWidget->addTab( alignProcess, QIcon(":/icons/ekos_align.png"), "");
- toolsWidget->tabBar()->setTabToolTip(index, i18n("Align"));
- connect(alignProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
+ alignProcess = new Ekos::Align();
+ int index = toolsWidget->addTab( alignProcess, QIcon(":/icons/ekos_align.png"), "");
+ toolsWidget->tabBar()->setTabToolTip(index, i18n("Align"));
+ connect(alignProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
- if (captureProcess)
- {
- // Alignment flag
- connect(alignProcess, SIGNAL(solverComplete(bool)), captureProcess, SLOT(enableAlignmentFlag()), Qt::UniqueConnection);
- connect(alignProcess, SIGNAL(solverSlewComplete()), captureProcess, SLOT(checkAlignmentSlewComplete()), Qt::UniqueConnection);
+ if (captureProcess)
+ {
+ // Alignment flag
+ connect(alignProcess, SIGNAL(solverComplete(bool)), captureProcess, SLOT(enableAlignmentFlag()), Qt::UniqueConnection);
+ connect(alignProcess, SIGNAL(solverSlewComplete()), captureProcess, SLOT(checkAlignmentSlewComplete()), Qt::UniqueConnection);
- // Meridian Flip
- connect(captureProcess, SIGNAL(meridialFlipTracked()), alignProcess, SLOT(captureAndSolve()), Qt::UniqueConnection);
- }
+ // Meridian Flip
+ connect(captureProcess, SIGNAL(meridialFlipTracked()), alignProcess, SLOT(captureAndSolve()), Qt::UniqueConnection);
+ }
- if (focusProcess)
- {
- // Filter lock
- connect(focusProcess, SIGNAL(filterLockUpdated(ISD::GDInterface*,int)), alignProcess, SLOT(setLockedFilter(ISD::GDInterface*,int)), Qt::UniqueConnection);
- connect(focusProcess, SIGNAL(statusUpdated(bool)), alignProcess, SLOT(updateFocusStatus(bool)), Qt::UniqueConnection);
- }
+ if (focusProcess)
+ {
+ // Filter lock
+ connect(focusProcess, SIGNAL(filterLockUpdated(ISD::GDInterface*,int)), alignProcess, SLOT(setLockedFilter(ISD::GDInterface*,int)), Qt::UniqueConnection);
+ connect(focusProcess, SIGNAL(statusUpdated(bool)), alignProcess, SLOT(updateFocusStatus(bool)), Qt::UniqueConnection);
+ }
}
@@ -1361,6 +1415,14 @@ void EkosManager::initFocus()
int index = toolsWidget->addTab( focusProcess, QIcon(":/icons/ekos_focus.png"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Focus"));
connect(focusProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
+ connect(focusProcess, SIGNAL(statusUpdated(bool)), this, SLOT(updateFocusStatus(bool)));
+ connect(focusProcess, SIGNAL(newStarPixmap(QPixmap&)), this, SLOT(updateFocusStarPixmap(QPixmap&)));
+ connect(focusProcess, SIGNAL(newProfilePixmap(QPixmap&)), this, SLOT(updateFocusProfilePixmap(QPixmap&)));
+
+ focusGroup->setEnabled(true);
+
+ focusPI = new QProgressIndicator(focusProcess);
+ focusStatusLayout->addWidget(focusPI);
if (captureProcess)
{
@@ -1401,6 +1463,7 @@ void EkosManager::initMount()
connect(mountProcess, SIGNAL(newStatus(ISD::Telescope::TelescopeStatus)), this, SLOT(updateMountStatus(ISD::Telescope::TelescopeStatus)));
mountPI = new QProgressIndicator(mountProcess);
mountStatusLayout->addWidget(mountPI);
+ mountGroup->setEnabled(true);
if (captureProcess)
{
@@ -1427,6 +1490,14 @@ void EkosManager::initGuide()
int index = toolsWidget->addTab( guideProcess, QIcon(":/icons/ekos_guide.png"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Guide"));
connect(guideProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
+ guideGroup->setEnabled(true);
+
+ guidePI = new QProgressIndicator(guideProcess);
+ guideStatusLayout->addWidget(guidePI);
+
+ connect(guideProcess, SIGNAL(newStatus(Ekos::GuideState)), this, SLOT(updateGuideStatus(Ekos::GuideState)));
+ connect(guideProcess, SIGNAL(newStarPixmap(QPixmap&)), this, SLOT(updateGuideStarPixmap(QPixmap&)));
+ connect(guideProcess, SIGNAL(newProfilePixmap(QPixmap&)), this, SLOT(updateGuideProfilePixmap(QPixmap&)));
}
if (captureProcess)
@@ -1491,20 +1562,20 @@ void EkosManager::initDustCap()
void EkosManager::setST4(ISD::ST4 * st4Driver)
{
- appendLogText(i18n("Guider port from %1 is ready.", st4Driver->getDeviceName()));
+ appendLogText(i18n("Guider port from %1 is ready.", st4Driver->getDeviceName()));
- useST4=true;
+ useST4=true;
- initGuide();
+ initGuide();
- guideProcess->addST4(st4Driver);
+ guideProcess->addST4(st4Driver);
- if (Options::defaultST4Driver().isEmpty() == false)
- guideProcess->setST4(Options::defaultST4Driver());
+ if (Options::defaultST4Driver().isEmpty() == false)
+ guideProcess->setST4(Options::defaultST4Driver());
- //if (ao && ao->getDeviceName() == st4Driver->getDeviceName())
- if (managedDevices.contains(KSTARS_ADAPTIVE_OPTICS) && (st4Driver->getDeviceName() == managedDevices[KSTARS_ADAPTIVE_OPTICS]->getDeviceName()))
- guideProcess->setAO(st4Driver);
+ //if (ao && ao->getDeviceName() == st4Driver->getDeviceName())
+ if (managedDevices.contains(KSTARS_ADAPTIVE_OPTICS) && (st4Driver->getDeviceName() == managedDevices[KSTARS_ADAPTIVE_OPTICS]->getDeviceName()))
+ guideProcess->setAO(st4Driver);
}
@@ -1512,62 +1583,62 @@ void EkosManager::removeTabs()
{
disconnect(toolsWidget, SIGNAL(currentChanged(int)), this, SLOT(processTabChange()));
- for (int i=2; i < toolsWidget->count(); i++)
- toolsWidget->removeTab(i);
+ for (int i=2; i < toolsWidget->count(); i++)
+ toolsWidget->removeTab(i);
- delete (alignProcess);
- alignProcess = NULL;
+ delete (alignProcess);
+ alignProcess = NULL;
- //ccd = NULL;
- delete (captureProcess);
- captureProcess = NULL;
+ //ccd = NULL;
+ delete (captureProcess);
+ captureProcess = NULL;
- //guider = NULL;
- delete (guideProcess);
- guideProcess = NULL;
+ //guider = NULL;
+ delete (guideProcess);
+ guideProcess = NULL;
- delete (mountProcess);
- mountProcess = NULL;
+ delete (mountProcess);
+ mountProcess = NULL;
- //ao = NULL;
+ //ao = NULL;
- //focuser = NULL;
- delete (focusProcess);
- focusProcess = NULL;
+ //focuser = NULL;
+ delete (focusProcess);
+ focusProcess = NULL;
- //dome = NULL;
- delete (domeProcess);
- domeProcess = NULL;
+ //dome = NULL;
+ delete (domeProcess);
+ domeProcess = NULL;
- //weather = NULL;
- delete (weatherProcess);
- weatherProcess = NULL;
+ //weather = NULL;
+ delete (weatherProcess);
+ weatherProcess = NULL;
- //dustCap = NULL;
- delete (dustCapProcess);
- dustCapProcess = NULL;
+ //dustCap = NULL;
+ delete (dustCapProcess);
+ dustCapProcess = NULL;
- //lightBox = NULL;
+ //lightBox = NULL;
- //aux1 = NULL;
- //aux2 = NULL;
- //aux3 = NULL;
- //aux4 = NULL;
+ //aux1 = NULL;
+ //aux2 = NULL;
+ //aux3 = NULL;
+ //aux4 = NULL;
- managedDevices.clear();
+ managedDevices.clear();
- connect(toolsWidget, SIGNAL(currentChanged(int)), this, SLOT(processTabChange()));
+ connect(toolsWidget, SIGNAL(currentChanged(int)), this, SLOT(processTabChange()));
}
bool EkosManager::isRunning(const QString &process)
{
- QProcess ps;
- ps.start("ps", QStringList() << "-o" << "comm" << "--no-headers" << "-C" << process);
- ps.waitForFinished();
- QString output = ps.readAllStandardOutput();
- return output.startsWith(process);
+ QProcess ps;
+ ps.start("ps", QStringList() << "-o" << "comm" << "--no-headers" << "-C" << process);
+ ps.waitForFinished();
+ QString output = ps.readAllStandardOutput();
+ return output.startsWith(process);
}
void EkosManager::addObjectToScheduler(SkyObject *object)
@@ -1723,24 +1794,153 @@ void EkosManager::updateMountCoords(const QString &ra, const QString &dec, const
altOUT->setText(alt);
}
-void EkosManager::updateCaptureStatus(const QString &status, double percentage)
+void EkosManager::updateCaptureStatus(Ekos::CaptureState status)
{
- captureStatus->setText(status);
- captureProgress->setValue(percentage);
+ captureStatus->setText(Ekos::getCaptureStatusString(status));
+ captureProgress->setValue(captureProcess->getProgressPercentage());
+
+ overallCountDown.setHMS(0,0,0);
+ overallCountDown = overallCountDown.addSecs(captureProcess->getOverallRemainingTime());
- if (status != i18n("Aborted") && status != i18n("Complete"))
+ sequenceCountDown.setHMS(0,0,0);
+ sequenceCountDown = sequenceCountDown.addSecs(captureProcess->getActiveJobRemainingTime());
+
+ if (status != Ekos::CAPTURE_ABORTED && status != Ekos::CAPTURE_COMPLETE)
{
if (capturePI->isAnimated() == false)
+ {
capturePI->startAnimation();
+ countdownTimer.start();
+ }
}
else
{
if (capturePI->isAnimated())
+ {
capturePI->stopAnimation();
+ countdownTimer.stop();
+
+ overallRemainingTime->setText("--:--:--");
+ sequenceRemainingTime->setText("--:--:--");
+ }
+ }
+}
+
+void EkosManager::updateCaptureImage(QImage *image, Ekos::SequenceJob *job)
+{
+ delete (previewPixmap);
+ previewPixmap = new QPixmap(QPixmap::fromImage(*image));
+ previewImage->setPixmap(previewPixmap->scaled(previewImage->width(), previewImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+
+ if (job->isPreview() == false)
+ {
+ sequenceLabel->setText(QString("# %1/%2 %3").arg(captureProcess->getActiveJobID()+1).arg(captureProcess->getJobCount()).arg(job->getPrefix()));
+ sequenceProgress->setRange(0, job->getCount());
+ sequenceProgress->setValue(static_cast<int>(job->getCompleted()+1));
}
}
-void EkosManager::updateCaptureImage(QImage *image)
+void EkosManager::updateCaptureCountDown()
+{
+ overallCountDown = overallCountDown.addSecs(-1);
+ if (overallCountDown.hour() == 23)
+ overallCountDown.setHMS(0,0,0);
+
+ sequenceCountDown = sequenceCountDown.addSecs(-1);
+ if (sequenceCountDown.hour() == 23)
+ sequenceCountDown.setHMS(0,0,0);
+
+ overallRemainingTime->setText(overallCountDown.toString("hh:mm:ss"));
+ sequenceRemainingTime->setText(sequenceCountDown.toString("hh:mm:ss"));
+}
+
+void EkosManager::updateFocusStarPixmap(QPixmap &starPixmap)
+{
+ delete(focusStarPixmap);
+ focusStarPixmap = new QPixmap(starPixmap);
+
+ focusStarImage->setPixmap(focusStarPixmap->scaled(focusStarImage->width(), focusStarImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+
+ focusStarPixmap->save(focusStarFile.fileName(), "PNG", 100);
+
+ focusStarImage->setToolTip(QString("<img src='%1' width='100' height='100'>").arg(focusStarFile.fileName()));
+}
+
+void EkosManager::updateFocusProfilePixmap(QPixmap &profilePixmap)
{
- fitsImage->setPixmap(QPixmap::fromImage(image->scaled(fitsImage->width(), fitsImage->height(), Qt::KeepAspectRatio)));
+ delete (focusProfilePixmap);
+ focusProfilePixmap = new QPixmap(profilePixmap);
+
+ focusProfileImage->setPixmap(focusProfilePixmap->scaled(focusProfileImage->width(), focusProfileImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+
+ focusProfilePixmap->save(focusProfileFile.fileName(), "PNG", 100);
+
+ focusProfileImage->setToolTip(QString("<img src='%1'>").arg(focusProfileFile.fileName()));
+}
+
+void EkosManager::updateFocusStatus(bool status)
+{
+ if (status)
+ {
+ focusStatus->setText(i18n("In Progress"));
+ if (focusPI->isAnimated() == false)
+ focusPI->startAnimation();
+ }
+ else
+ {
+ focusStatus->setText(i18n("Stopped"));
+ if (focusPI->isAnimated())
+ focusPI->stopAnimation();
+ }
+}
+
+void EkosManager::updateGuideStatus(Ekos::GuideState status)
+{
+ guideStatus->setText(Ekos::getGuideStatusString(status));
+
+ switch (status)
+ {
+ case Ekos::GUIDE_IDLE:
+ case Ekos::GUIDE_CALIBRATION_ERROR:
+ case Ekos::GUIDE_ABORTED:
+ case Ekos::GUIDE_SUSPENDED:
+ case Ekos::GUIDE_DITHERING_ERROR:
+ case Ekos::GUIDE_CALIBRATION_SUCESS:
+ case Ekos::GUIDE_DITHERING_SUCCESS:
+ if (guidePI->isAnimated())
+ guidePI->stopAnimation();
+ break;
+
+ case Ekos::GUIDE_CALIBRATING:
+ case Ekos::GUIDE_GUIDING:
+ case Ekos::GUIDE_DITHERING:
+ if (guidePI->isAnimated() == false)
+ guidePI->startAnimation();
+
+ break;
+ }
+}
+
+void EkosManager::updateGuideStarPixmap(QPixmap & starPix)
+{
+ delete (guideStarPixmap);
+ guideStarPixmap = new QPixmap(starPix);
+
+ guideStarImage->setPixmap(guideStarPixmap->scaled(guideStarImage->width(), guideStarImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+
+ guideStarPixmap->save(guideStarFile.fileName(), "PNG", 100);
+
+ guideStarImage->setToolTip(QString("<img src='%1' width='100' height='100'>").arg(guideStarFile.fileName()));
+}
+
+void EkosManager::updateGuideProfilePixmap(QPixmap & profilePix)
+{
+ delete (guideProfilePixmap);
+ guideProfilePixmap = new QPixmap(profilePix);
+
+ guideProfileImage->setPixmap(guideProfilePixmap->scaled(guideProfileImage->width(), guideProfileImage->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
+
+ guideProfilePixmap->save(guideProfileFile.fileName(), "PNG", 100);
+
+ guideProfileImage->setToolTip(QString("<img src='%1'>").arg(guideProfileFile.fileName()));
}
diff --git a/kstars/ekos/ekosmanager.h b/kstars/ekos/ekosmanager.h
index 95886d5..03f182c 100644
--- a/kstars/ekos/ekosmanager.h
+++ b/kstars/ekos/ekosmanager.h
@@ -18,6 +18,8 @@
#endif
#include "ui_ekosmanager.h"
+
+#include "ekos.h"
#include "indi/indistd.h"
#include "capture.h"
#include "focus.h"
@@ -39,7 +41,7 @@ class KPageWidgetItem;
class QProgressIndicator;
/**
- *@class EkosManager
+ *@class Manager
*@short Primary class to handle all Ekos modules.
* The Ekos Manager class manages startup and shutdown of INDI devices and registeration of devices within Ekos Modules. Ekos module consist of \ref Ekos::Mount, \ref Ekos::Capture, \ref Ekos::Focus, \ref Ekos::Guide, and \ref Ekos::Align modules.
* \ref EkosDBusInterface "Ekos DBus Interface" provides high level functions to control devices and Ekos modules for a total robotic operation:
@@ -123,7 +125,8 @@ public:
protected:
void closeEvent(QCloseEvent *);
void hideEvent(QHideEvent *);
- void showEvent(QShowEvent *);
+ void showEvent(QShowEvent *);
+ void resizeEvent(QResizeEvent *);
public slots:
@@ -185,8 +188,19 @@ private slots:
void updateMountStatus(ISD::Telescope::TelescopeStatus status);
// Capture Summary
- void updateCaptureStatus(const QString &status, double percentage);
- void updateCaptureImage(QImage *image);
+ void updateCaptureStatus(Ekos::CaptureState status);
+ void updateCaptureImage(QImage *image, Ekos::SequenceJob *job);
+ void updateCaptureCountDown();
+
+ // Focus summary
+ void updateFocusStatus(bool status);
+ void updateFocusStarPixmap(QPixmap &starPixmap);
+ void updateFocusProfilePixmap(QPixmap &profilePixmap);
+
+ // Guide Summary
+ void updateGuideStatus(Ekos::GuideState status);
+ void updateGuideStarPixmap(QPixmap &starPix);
+ void updateGuideProfilePixmap(QPixmap &profilePix);
private:
@@ -253,10 +267,28 @@ private slots:
// Mount Summary
QProgressIndicator *mountPI;
+
+ // Capture Summary
+ QTime overallCountDown;
+ QTime sequenceCountDown;
+ QTimer countdownTimer;
+ QPixmap *previewPixmap;
QProgressIndicator *capturePI;
+ // Focus Summary
+ QProgressIndicator *focusPI;
+ QPixmap *focusStarPixmap;
+ QPixmap *focusProfilePixmap;
+ QTemporaryFile focusStarFile;
+ QTemporaryFile focusProfileFile;
-};
+ // Guide Summary
+ QProgressIndicator *guidePI;
+ QPixmap *guideStarPixmap;
+ QPixmap *guideProfilePixmap;
+ QTemporaryFile guideStarFile;
+ QTemporaryFile guideProfileFile;
+};
#endif // EKOS_H
diff --git a/kstars/ekos/ekosmanager.ui b/kstars/ekos/ekosmanager.ui
index 6b530bf..8dc76da 100644
--- a/kstars/ekos/ekosmanager.ui
+++ b/kstars/ekos/ekosmanager.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>814</width>
- <height>609</height>
+ <width>813</width>
+ <height>645</height>
</rect>
</property>
<property name="baseSize">
@@ -19,25 +19,7 @@
<property name="windowTitle">
<string>Ekos</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="spacing">
- <number>2</number>
- </property>
- <property name="sizeConstraint">
- <enum>QLayout::SetMinAndMaxSize</enum>
- </property>
- <property name="leftMargin">
- <number>2</number>
- </property>
- <property name="topMargin">
- <number>2</number>
- </property>
- <property name="rightMargin">
- <number>2</number>
- </property>
- <property name="bottomMargin">
- <number>2</number>
- </property>
+ <layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QScrollArea" name="ekosScrollArea">
<property name="sizePolicy">
@@ -72,8 +54,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>810</width>
- <height>605</height>
+ <width>799</width>
+ <height>631</height>
</rect>
</property>
<property name="sizePolicy">
@@ -88,242 +70,1065 @@
<height>0</height>
</size>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <property name="spacing">
- <number>2</number>
- </property>
- <property name="sizeConstraint">
- <enum>QLayout::SetMinAndMaxSize</enum>
- </property>
- <property name="leftMargin">
- <number>2</number>
- </property>
- <property name="topMargin">
- <number>2</number>
- </property>
- <property name="rightMargin">
- <number>2</number>
- </property>
- <property name="bottomMargin">
- <number>2</number>
- </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QTabWidget" name="toolsWidget">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <widget class="QSplitter" name="splitter">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="setupTab">
- <attribute name="title">
- <string/>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="profileGroup">
- <property name="title">
- <string>1. Select Profile</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Profile:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="profileCombo">
- <property name="sizeAdjustPolicy">
- <enum>QComboBox::AdjustToContents</enum>
- </property>
- </widget>
- </item>
+ <widget class="QTabWidget" name="toolsWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="setupTab">
+ <attribute name="title">
+ <string/>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QGroupBox" name="profileGroup">
+ <property name="title">
+ <string>1. Select Profile</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Profile:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="profileCombo">
+ <property name="sizeAdjustPolicy">
+ <enum>QComboBox::AdjustToContents</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="addProfileB">
+ <property name="minimumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Add profile</string>
+ </property>
+ <property name="statusTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="editProfileB">
+ <property name="minimumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Edit profile</string>
+ </property>
+ <property name="statusTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="deleteProfileB">
+ <property name="minimumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Remove profile</string>
+ </property>
+ <property name="statusTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <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>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QPushButton" name="addProfileB">
- <property name="minimumSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Add profile</string>
- </property>
- <property name="statusTip">
- <string/>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="editProfileB">
- <property name="minimumSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Edit profile</string>
- </property>
- <property name="statusTip">
- <string/>
- </property>
- <property name="text">
- <string/>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>2. Start &amp;&amp; Stop INDI</string>
</property>
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QPushButton" name="processINDIB">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Start INDI</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="controlPanelB">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Control Panel...</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="optionsB">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Options...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
</item>
<item>
- <widget class="QPushButton" name="deleteProfileB">
- <property name="minimumSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Remove profile</string>
- </property>
- <property name="statusTip">
- <string/>
- </property>
- <property name="text">
- <string/>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="title">
+ <string>3. Connect &amp;&amp; Disconnect Devices</string>
</property>
+ <layout class="QVBoxLayout" name="verticalLayout_8">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QPushButton" name="connectB">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Connect</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="disconnectB">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Disconnect</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
</item>
- <item>
- <spacer name="horizontalSpacer_2">
- <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>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>2. Start &amp;&amp; Stop INDI</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QPushButton" name="processINDIB">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Start INDI</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="controlPanelB">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Control Panel...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="optionsB">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Options...</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>3. Connect &amp;&amp; Disconnect Devices</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_8">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="QPushButton" name="connectB">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Connect</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="disconnectB">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Disconnect</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </item>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="summaryGroup">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Summary</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_8" stretch="1,2">
+ <item>
+ <widget class="QLabel" name="previewImage">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>300</width>
+ <height>300</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="cursor">
+ <cursorShape>ArrowCursor</cursorShape>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color:black;</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout" rowstretch="1,1" columnstretch="1,1">
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="mountGroup">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="title">
+ <string>Mount &amp;&amp; Alignment</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <layout class="QHBoxLayout" name="mountStatusLayout">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="styleSheet">
+ <string notr="true">font-weight:bold;</string>
+ </property>
+ <property name="text">
+ <string>Status:</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::PlainText</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="mountStatus">
+ <property name="styleSheet">
+ <string notr="true">font-weight:bold;</string>
+ </property>
+ <property name="text">
+ <string>Idle</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::PlainText</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <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>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="toolTip">
+ <string>Right Ascension</string>
+ </property>
+ <property name="text">
+ <string>RA:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="raOUT">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label_7">
+ <property name="toolTip">
+ <string>Declination</string>
+ </property>
+ <property name="text">
+ <string>DE:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QLineEdit" name="decOUT">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_6">
+ <property name="toolTip">
+ <string>Azimuth</string>
+ </property>
+ <property name="text">
+ <string>AZ:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="azOUT">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLabel" name="label_8">
+ <property name="toolTip">
+ <string>Altitude</string>
+ </property>
+ <property name="text">
+ <string>AL:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QLineEdit" name="altOUT">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>10</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QGroupBox" name="captureGroup">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="title">
+ <string>Capture</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_10">
+ <item>
+ <layout class="QHBoxLayout" name="captureStatusLayout">
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="styleSheet">
+ <string notr="true">font-weight:bold;</string>
+ </property>
+ <property name="text">
+ <string>Status:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="captureStatus">
+ <property name="styleSheet">
+ <string notr="true">font-weight:bold;</string>
+ </property>
+ <property name="text">
+ <string>Idle</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>1</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_12">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <widget class="QLabel" name="sequenceLabel">
+ <property name="text">
+ <string>Sequence</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_7">
+ <item>
+ <spacer name="horizontalSpacer_7">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>13</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QRoundProgressBar" name="sequenceProgress" native="true">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>100</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>100</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_11"/>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_8">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>13</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="sequenceRemainingTime">
+ <property name="text">
+ <string>--:--:--</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_6">
+ <item>
+ <widget class="QLabel" name="overallLabel">
+ <property name="text">
+ <string>Overall</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_11">
+ <item>
+ <spacer name="horizontalSpacer_10">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>13</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QRoundProgressBar" name="captureProgress" native="true">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>100</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>100</height>
+ </size>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_14"/>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_9">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>13</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="overallRemainingTime">
+ <property name="text">
+ <string>--:--:--</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="focusGroup">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Focus</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,3">
+ <item>
+ <layout class="QHBoxLayout" name="focusStatusLayout">
+ <item>
+ <widget class="QLabel" name="label_10">
+ <property name="styleSheet">
+ <string notr="true">font-weight:bold;</string>
+ </property>
+ <property name="text">
+ <string>Status:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="focusStatus">
+ <property name="styleSheet">
+ <string notr="true">font-weight:bold;</string>
+ </property>
+ <property name="text">
+ <string>Idle</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_5">
+ <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>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_9" stretch="0,0">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ <item>
+ <widget class="QLabel" name="focusProfileImage">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="baseSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="palette">
+ <palette>
+ <active>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>239</red>
+ <green>240</green>
+ <blue>241</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="cursor">
+ <cursorShape>ArrowCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Focus Profile</string>
+ </property>
+ <property name="autoFillBackground">
+ <bool>true</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../data/kstars.qrc">:/images/noimage.png</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="focusStarImage">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="palette">
+ <palette>
+ <active>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>239</red>
+ <green>240</green>
+ <blue>241</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="toolTip">
+ <string>Focus Star</string>
+ </property>
+ <property name="autoFillBackground">
+ <bool>true</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../data/kstars.qrc">:/images/noimage.png</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QGroupBox" name="guideGroup">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="title">
+ <string>Guide</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_9" stretch="1,3">
+ <item>
+ <layout class="QHBoxLayout" name="guideStatusLayout">
+ <item>
+ <widget class="QLabel" name="label_12">
+ <property name="styleSheet">
+ <string notr="true">font-weight:bold;</string>
+ </property>
+ <property name="text">
+ <string>Status:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="guideStatus">
+ <property name="styleSheet">
+ <string notr="true">font-weight:bold;</string>
+ </property>
+ <property name="text">
+ <string>Idle</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_6">
+ <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>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_10" stretch="3,1">
+ <item>
+ <widget class="QLabel" name="guideProfileImage">
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="palette">
+ <palette>
+ <active>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>239</red>
+ <green>240</green>
+ <blue>241</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="toolTip">
+ <string>Guide Profile</string>
+ </property>
+ <property name="autoFillBackground">
+ <bool>true</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../data/kstars.qrc">:/images/noimage.png</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="guideStarImage">
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="palette">
+ <palette>
+ <active>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="Window">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>239</red>
+ <green>240</green>
+ <blue>241</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="cursor">
+ <cursorShape>ArrowCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Guide Star</string>
+ </property>
+ <property name="autoFillBackground">
+ <bool>true</bool>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../data/kstars.qrc">:/images/noimage.png</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <layout class="QVBoxLayout" name="LoggerLayout">
<item>
- <widget class="QGroupBox" name="summaryGroup">
+ <widget class="QPlainTextEdit" name="ekosLogOut">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -331,457 +1136,67 @@
<property name="minimumSize">
<size>
<width>0</width>
- <height>0</height>
+ <height>50</height>
</size>
</property>
- <property name="title">
- <string>Summary</string>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="sizeAdjustPolicy">
+ <enum>QAbstractScrollArea::AdjustToContents</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_8">
- <item>
- <widget class="QLabel" name="fitsImage">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>300</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="cursor">
- <cursorShape>ArrowCursor</cursorShape>
- </property>
- <property name="frameShape">
- <enum>QFrame::Box</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../data/kstars.qrc">:/images/noimage.png</pixmap>
- </property>
- <property name="scaledContents">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout" rowstretch="1,1" columnstretch="1,1">
- <item row="0" column="0">
- <widget class="QGroupBox" name="mountGroup">
- <property name="title">
- <string>Mount</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
- <layout class="QHBoxLayout" name="mountStatusLayout">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="styleSheet">
- <string notr="true">font-weight:bold;</string>
- </property>
- <property name="text">
- <string>Status:</string>
- </property>
- <property name="textFormat">
- <enum>Qt::PlainText</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="mountStatus">
- <property name="styleSheet">
- <string notr="true">font-weight:bold;</string>
- </property>
- <property name="text">
- <string>Idle</string>
- </property>
- <property name="textFormat">
- <enum>Qt::PlainText</enum>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_3">
- <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>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
- <widget class="QLabel" name="label_5">
- <property name="toolTip">
- <string>Right Ascension</string>
- </property>
- <property name="text">
- <string>RA:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="raOUT">
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="label_7">
- <property name="toolTip">
- <string>Declination</string>
- </property>
- <property name="text">
- <string>DE:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLineEdit" name="decOUT">
- <property name="text">
- <string/>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_6">
- <property name="toolTip">
- <string>Azimuth</string>
- </property>
- <property name="text">
- <string>AZ:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="azOUT">
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="label_8">
- <property name="toolTip">
- <string>Altitude</string>
- </property>
- <property name="text">
- <string>AL:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QLineEdit" name="altOUT">
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>10</width>
- <height>10</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QGroupBox" name="captureGroup">
- <property name="title">
- <string>Capture</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_6">
- <item>
- <layout class="QHBoxLayout" name="captureStatusLayout">
- <item>
- <widget class="QLabel" name="label_4">
- <property name="styleSheet">
- <string notr="true">font-weight:bold;</string>
- </property>
- <property name="text">
- <string>Status:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="captureStatus">
- <property name="styleSheet">
- <string notr="true">font-weight:bold;</string>
- </property>
- <property name="text">
- <string>Idle</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>1</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_7">
- <item>
- <spacer name="horizontalSpacer_7">
- <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>
- <widget class="QRoundProgressBar" name="captureProgress" native="true">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>100</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>100</height>
- </size>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_5"/>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_8">
- <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>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QGroupBox" name="focusGroup">
- <property name="title">
- <string>Focus</string>
- </property>
- <layout class="QVBoxLayout" name="focusVerticalLayout">
- <item>
- <layout class="QHBoxLayout" name="focusStatusLayout">
- <item>
- <widget class="QLabel" name="label_10">
- <property name="styleSheet">
- <string notr="true">font-weight:bold;</string>
- </property>
- <property name="text">
- <string>Status:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="focusStatus">
- <property name="styleSheet">
- <string notr="true">font-weight:bold;</string>
- </property>
- <property name="text">
- <string>Idle</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_5">
- <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>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QGroupBox" name="guideGroup">
- <property name="title">
- <string>Guide</string>
- </property>
- <layout class="QVBoxLayout" name="guideVerticalLayout">
- <item>
- <layout class="QHBoxLayout" name="guideStatusLayout">
- <item>
- <widget class="QLabel" name="label_12">
- <property name="styleSheet">
- <string notr="true">font-weight:bold;</string>
- </property>
- <property name="text">
- <string>Status:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="guideStatus">
- <property name="styleSheet">
- <string notr="true">font-weight:bold;</string>
- </property>
- <property name="text">
- <string>Idle</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_6">
- <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>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
</widget>
</item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="spacing">
+ <number>2</number>
+ </property>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinAndMaxSize</enum>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="enableLoggingCheck">
+ <property name="text">
+ <string>Enable logging</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <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>
+ <widget class="QPushButton" name="clearB">
+ <property name="text">
+ <string>Clear</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</widget>
</widget>
</item>
- <item>
- <widget class="QPlainTextEdit" name="ekosLogOut">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>50</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="sizeAdjustPolicy">
- <enum>QAbstractScrollArea::AdjustToContents</enum>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <property name="spacing">
- <number>2</number>
- </property>
- <property name="sizeConstraint">
- <enum>QLayout::SetMinAndMaxSize</enum>
- </property>
- <item>
- <widget class="QCheckBox" name="enableLoggingCheck">
- <property name="text">
- <string>Enable logging</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <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>
- <widget class="QPushButton" name="clearB">
- <property name="text">
- <string>Clear</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
</layout>
</widget>
</widget>
diff --git a/kstars/ekos/focus.cpp b/kstars/ekos/focus.cpp
index 7a23815..5f63767 100644
--- a/kstars/ekos/focus.cpp
+++ b/kstars/ekos/focus.cpp
@@ -23,6 +23,8 @@
#include "indi/clientmanager.h"
#include "indi/indifilter.h"
+#include "auxiliary/kspaths.h"
+
#include "fitsviewer/fitsviewer.h"
#include "fitsviewer/fitstab.h"
#include "fitsviewer/fitsview.h"
@@ -146,13 +148,18 @@ Focus::Focus()
profilePlot->xAxis->setLabelColor(Qt::white);
profilePlot->yAxis->setLabelColor(Qt::white);
- profilePlot->addGraph();
- profilePlot->graph(0)->setLineStyle(QCPGraph::lsLine);
- profilePlot->graph(0)->setPen(QPen(Qt::red, 2));
+ firstGaus = NULL;
+
+ currentGaus = profilePlot->addGraph();
+ currentGaus->setLineStyle(QCPGraph::lsLine);
+ currentGaus->setPen(QPen(Qt::red, 2));
- profilePlot->addGraph();
- profilePlot->graph(1)->setLineStyle(QCPGraph::lsLine);
- profilePlot->graph(1)->setPen(QPen(Qt::darkGreen, 1));
+ lastGaus = profilePlot->addGraph();
+ lastGaus->setLineStyle(QCPGraph::lsLine);
+ QPen pen(Qt::darkGreen);
+ pen.setStyle(Qt::DashLine);
+ pen.setWidth(2);
+ lastGaus->setPen(pen);
HFRPlot->setBackground(QBrush(Qt::black));
@@ -631,6 +638,12 @@ void Focus::start()
clearDataPoints();
+ if (firstGaus)
+ {
+ profilePlot->removeGraph(firstGaus);
+ firstGaus = NULL;
+ }
+
Options::setFocusTicks(stepIN->value());
Options::setFocusTolerance(toleranceIN->value());
Options::setFocusExposure(exposureIN->value());
@@ -695,7 +708,7 @@ void Focus::abort()
noStarCount = 0;
//maxHFR=1;
- disconnect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
+ disconnect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
if (rememberUploadMode != currentCCD->getUploadMode())
currentCCD->setUploadMode(rememberUploadMode);
@@ -779,7 +792,7 @@ void Focus::capture()
if (ISOCombo->isEnabled() && ISOCombo->currentIndex() != -1 && targetChip->getISOIndex() != ISOCombo->currentIndex())
targetChip->setISOIndex(ISOCombo->currentIndex());
- connect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
+ connect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
targetChip->setFrameType(ccdFrame);
@@ -962,6 +975,9 @@ void Focus::newFITS(IBLOB *bp)
disconnect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
+ starPixmap = targetImage->getTrackingBoxPixmap();
+ emit newStarPixmap(starPixmap);
+
// If we're not framing, let's try to detect stars
if (inFocusLoop == false)
{
@@ -1002,7 +1018,6 @@ void Focus::newFITS(IBLOB *bp)
// If just framing, let's capture again
else
{
- drawProfilePlot();
capture();
return;
@@ -1019,12 +1034,13 @@ void Focus::newFITS(IBLOB *bp)
if (maxStar == NULL)
{
appendLogText(i18n("Failed to automatically select a star. Please select a star manually."));
- targetImage->updateMode(FITS_GUIDE);
- targetImage->setGuideBoxSize(kcfg_focusBoxSize->value());
+ //targetImage->updateMode(FITS_GUIDE);
+ targetImage->setTrackingBoxSize(QSize(kcfg_focusBoxSize->value(), kcfg_focusBoxSize->value()));
if (fw == 0 || fh == 0)
targetChip->getFrame(&fx, &fy, &fw, &fh);
- targetImage->setGuideSquare(fw/2, fh/2);
- connect(targetImage, SIGNAL(guideStarSelected(int,int)), this, SLOT(focusStarSelected(int, int)), Qt::UniqueConnection);
+ targetImage->setTrackingBoxCenter(QPointF(fw/2, fh/2));
+ targetImage->setTrackingBoxEnabled(true);
+ connect(targetImage, SIGNAL(trackingStarSelected(int,int)), this, SLOT(focusStarSelected(int, int)), Qt::UniqueConnection);
QTimer::singleShot(AUTO_STAR_TIMEOUT, this, SLOT(checkAutoStarTimeout()));
@@ -1066,6 +1082,9 @@ void Focus::newFITS(IBLOB *bp)
frameModified = true;
haveDarkFrame=false;
calibrationState = CALIBRATE_NONE;
+
+ targetImage->setTrackingBoxCenter(QPointF(fw/2.0,fh/2.0));
+ targetImage->setTrackingBoxSize(QSize(subW/5.0, subH/5.0));
}
else
targetChip->getFrame(&fx, &fy, &fw, &fh);
@@ -1081,10 +1100,11 @@ void Focus::newFITS(IBLOB *bp)
else if (kcfg_subFrame->isEnabled() && kcfg_subFrame->isChecked())
{
appendLogText(i18n("Capture complete. Select a star to focus."));
- targetImage->updateMode(FITS_GUIDE);
- targetImage->setGuideBoxSize(kcfg_focusBoxSize->value());
- targetImage->setGuideSquare(fw/2, fh/2);
- connect(targetImage, SIGNAL(guideStarSelected(int,int)), this, SLOT(focusStarSelected(int, int)), Qt::UniqueConnection);
+ //targetImage->updateMode(FITS_GUIDE);
+ targetImage->setTrackingBoxSize(QSize(kcfg_focusBoxSize->value(),kcfg_focusBoxSize->value()));
+ targetImage->setTrackingBoxCenter(QPointF(fw/2, fh/2));
+ targetImage->setTrackingBoxEnabled(true);
+ connect(targetImage, SIGNAL(trackingStarSelected(int,int)), this, SLOT(focusStarSelected(int, int)), Qt::UniqueConnection);
return;
}
}
@@ -1129,6 +1149,16 @@ void Focus::newFITS(IBLOB *bp)
if (focusType == FOCUS_MANUAL || inAutoFocus==false)
return;
+ if (Options::focusLogging())
+ {
+ QDir dir;
+ QString path = KSPaths::writableLocation(QStandardPaths::GenericDataLocation) + "autofocus/" + QDateTime::currentDateTime().toString("yyyy-MM-dd");
+ dir.mkpath(path);
+ QString name = "autofocus_frame_" + QDateTime::currentDateTime().toString("HH:mm:ss") + ".fits";
+ QString filename = path + QStringLiteral("/") + name;
+ targetImage->getImageData()->saveFITS(filename);
+ }
+
if (canAbsMove || canRelMove)
autoFocusAbs();
else
@@ -1146,7 +1176,7 @@ void Focus::clearDataPoints()
}
void Focus::drawHFRPlot()
-{
+{
v_graph->setData(hfr_position, hfr_value);
if (focusType == FOCUS_AUTO && (canAbsMove || canRelMove) )
@@ -1168,8 +1198,8 @@ void Focus::drawHFRPlot()
void Focus::drawProfilePlot()
{
- QVector<double> key;
- QVector<double> currentGaus;
+ QVector<double> currentIndexes;
+ QVector<double> currentFrequencies;
// HFR = 50% * 1.36 = 68% aka one standard deviation
double stdDev = currentHFR * 1.36;
@@ -1178,20 +1208,40 @@ void Focus::drawProfilePlot()
float step = stdDev*4 / 20.0;
for (float x=start; x < end; x+= step)
{
- key.append(x);
- currentGaus.append((1/(stdDev*sqrt(2*M_PI))) * exp(-1 * ( x*x ) / (2 * (stdDev * stdDev))));
+ currentIndexes.append(x);
+ currentFrequencies.append((1/(stdDev*sqrt(2*M_PI))) * exp(-1 * ( x*x ) / (2 * (stdDev * stdDev))));
}
- profilePlot->graph(0)->setData(key, currentGaus);
+ currentGaus->setData(currentIndexes, currentFrequencies);
+
+ if (lastGausIndexes.count() > 0)
+ lastGaus->setData(lastGausIndexes, lastGausFrequencies);
- if (lastGaus.count() > 0)
- profilePlot->graph(1)->setData(lastGausRange, lastGaus);
+ if (focusType == FOCUS_AUTO && firstGaus == NULL)
+ {
+ firstGaus = profilePlot->addGraph();
+ QPen pen;
+ pen.setStyle(Qt::DashDotLine);
+ pen.setWidth(2);
+ pen.setColor(Qt::darkMagenta);
+ firstGaus->setPen(pen);
+
+ firstGaus->setData(currentIndexes, currentFrequencies);
+ }
+ else if (focusType == FOCUS_MANUAL && firstGaus)
+ {
+ profilePlot->removeGraph(firstGaus);
+ firstGaus=NULL;
+ }
profilePlot->rescaleAxes();
profilePlot->replot();
- lastGaus = currentGaus;
- lastGausRange = key;
+ lastGausIndexes = currentIndexes;
+ lastGausFrequencies = currentFrequencies;
+
+ profilePixmap = profilePlot->grab();
+ emit newProfilePixmap(profilePixmap);
}
void Focus::autoFocusAbs()
@@ -1570,7 +1620,7 @@ void Focus::autoFocusRel()
//if (fabs(currentHFR - lastHFR) < (toleranceIN->value()/100.0) && HFRInc == 0)
if (fabs(currentHFR - minHFR) < (toleranceIN->value()/100.0) && HFRInc == 0)
{
- appendLogText(i18n("Autofocus complete."));
+ appendLogText(i18n("Autofocus complete."));
abort();
emit suspendGuiding(false);
updateFocusStatus(true);
@@ -1726,7 +1776,7 @@ void Focus::processFocusNumber(INumberVectorProperty *nvp)
return;
}
- if (!strcmp(nvp->name, "FOCUS_TIMER"))
+ if (!strcmp(nvp->name, "FOCUS_TIMER"))
{
if (resetFocus && nvp->s == IPS_OK)
{
@@ -1852,7 +1902,8 @@ void Focus::focusStarSelected(int x, int y)
int offset = kcfg_focusBoxSize->value();
int binx, biny;
- disconnect(this, SLOT(focusStarSelected(int,int)));
+ FITSView *targetImage = targetChip->getImage(FITS_FOCUS);
+ disconnect(targetImage, SIGNAL(trackingStarSelected(int,int)), this, SLOT(focusStarSelected(int, int)));
targetChip->getBinning(&binx, &biny);
int minX, maxX, minY, maxY, minW, maxW, minH, maxH;
@@ -1872,17 +1923,12 @@ void Focus::focusStarSelected(int x, int y)
if ((y+h)>maxH)
h=maxH-y;
- FITSView *targetImage = targetChip->getImage(FITS_FOCUS);
- targetImage->updateMode(FITS_FOCUS);
+ //targetImage->updateMode(FITS_FOCUS);
if (targetChip->canSubframe())
{
targetChip->getFrame(&orig_x, &orig_y, &orig_w, &orig_h);
- /*orig_x = fx;
- orig_y = fy;
- orig_w = fw;
- orig_h = fh;*/
fx += x;
fy += y;
@@ -1896,6 +1942,10 @@ void Focus::focusStarSelected(int x, int y)
starSelected=true;
+ targetImage->setTrackingBoxEnabled(false);
+ targetImage->setTrackingBoxCenter(QPointF(fw/2.0,fh/2.0));
+ targetImage->setTrackingBoxSize(QSize(fw/5.0, fh/5.0));
+
capture();
}
diff --git a/kstars/ekos/focus.h b/kstars/ekos/focus.h
index 25db6fd..9269e96 100644
--- a/kstars/ekos/focus.h
+++ b/kstars/ekos/focus.h
@@ -322,6 +322,8 @@ signals:
void suspendGuiding(bool suspend);
void filterLockUpdated(ISD::GDInterface *filter, int lockedIndex);
void statusUpdated(bool status);
+ void newStarPixmap(QPixmap &);
+ void newProfilePixmap(QPixmap &);
private:
void drawHFRPlot();
@@ -439,8 +441,9 @@ private:
QCPGraph *v_graph;
// Last gaussian fit values
- QVector<double> lastGaus;
- QVector<double> lastGausRange;
+ QVector<double> firstGausIndexes, lastGausIndexes;
+ QVector<double> firstGausFrequencies, lastGausFrequencies;
+ QCPGraph *currentGaus, *firstGaus, *lastGaus;
QVector<double> hfr_position, hfr_value;
@@ -448,6 +451,10 @@ private:
int calibrationState;
bool haveDarkFrame;
float *darkBuffer;
+
+ // Pixmaps
+ QPixmap starPixmap;
+ QPixmap profilePixmap;
};
}
diff --git a/kstars/ekos/guide.cpp b/kstars/ekos/guide.cpp
index de213d2..495cc82 100644
--- a/kstars/ekos/guide.cpp
+++ b/kstars/ekos/guide.cpp
@@ -57,6 +57,8 @@ Guide::Guide() : QWidget()
calibration=NULL;
guider=NULL;
+ state = GUIDE_IDLE;
+
guideDeviationRA = guideDeviationDEC = 0;
tabWidget = new QTabWidget(this);
@@ -66,6 +68,8 @@ Guide::Guide() : QWidget()
exposureIN->setValue(Options::guideExposure());
connect(exposureIN, SIGNAL(editingFinished()), this, SLOT(saveDefaultGuideExposure()));
+ // TODO must develop a parent abstract GuideProcess class that is then inherited by both the internal guider and PHD2 and any additional future guiders
+ // It should provide the interface to hook its actions and results here instead of this mess.
pmath = new cgmath();
connect(pmath, SIGNAL(newAxisDelta(double,double)), this, SIGNAL(newAxisDelta(double,double)));
@@ -73,11 +77,15 @@ Guide::Guide() : QWidget()
calibration = new rcalibration(pmath, this);
+ connect(calibration, SIGNAL(newStatus(Ekos::GuideState)), this, SLOT(setStatus(Ekos::GuideState)));
+
guider = new rguider(pmath, this);
connect(guider, SIGNAL(ditherToggled(bool)), this, SIGNAL(ditherToggled(bool)));
connect(guider, SIGNAL(autoGuidingToggled(bool)), this, SIGNAL(autoGuidingToggled(bool)));
- connect(guider, SIGNAL(ditherComplete()), this, SIGNAL(ditherComplete()));
+ connect(guider, SIGNAL(ditherComplete()), this, SIGNAL(ditherComplete()));
+ connect(guider, SIGNAL(newStatus(Ekos::GuideState)), this, SLOT(setStatus(Ekos::GuideState)));
+ connect(guider, SIGNAL(newProfilePixmap(QPixmap &)), this, SIGNAL(newProfilePixmap(QPixmap &)));
tabWidget->addTab(calibration, calibration->windowTitle());
tabWidget->addTab(guider, guider->windowTitle());
@@ -95,12 +103,14 @@ Guide::Guide() : QWidget()
filterCombo->addItem(filter);
phd2 = new PHD2();
+
connect(phd2, SIGNAL(newLog(QString)), this, SLOT(appendLogText(QString)));
+ connect(phd2, SIGNAL(newStatus(Ekos::GuideState)), this, SLOT(setStatus(Ekos::GuideState)));
+
connect(phd2, SIGNAL(newAxisDelta(double,double)), this, SIGNAL(newAxisDelta(double,double)));
connect(phd2, SIGNAL(guideReady()), this, SIGNAL(guideReady()));
connect(phd2, SIGNAL(autoGuidingToggled(bool)), this, SIGNAL(autoGuidingToggled(bool)));
connect(phd2, SIGNAL(autoGuidingToggled(bool)), guider, SLOT(setGuideState(bool)));
- //connect(guider, SIGNAL(ditherToggled(bool)), phd2, SLOT(setDitherEnabled(bool)));
connect(phd2, SIGNAL(ditherComplete()), this, SIGNAL(ditherComplete()));
if (Options::usePHD2Guider())
@@ -156,7 +166,7 @@ void Guide::addGuideHead(ISD::GDInterface *newCCD)
setGuiderProcess(Options::useEkosGuider() ? GUIDE_INTERNAL : GUIDE_PHD2);
- }
+}
void Guide::setTelescope(ISD::GDInterface *newTelescope)
{
@@ -360,7 +370,7 @@ void Guide::addST4(ISD::ST4 *newST4)
ST4List.append(newST4);
- ST4Combo->addItem(newST4->getDeviceName());
+ ST4Combo->addItem(newST4->getDeviceName());
}
bool Guide::setST4(QString device)
@@ -449,11 +459,11 @@ bool Guide::capture()
if (guider->isGuiding())
{
- if (guider->isRapidGuide() == false)
- connect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
+ if (guider->isRapidGuide() == false)
+ connect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
- targetChip->capture(seqExpose);
- return true;
+ targetChip->capture(seqExpose);
+ return true;
}
connect(currentCCD, SIGNAL(BLOBUpdated(IBLOB*)), this, SLOT(newFITS(IBLOB*)));
@@ -489,7 +499,7 @@ void Guide::newFITS(IBLOB *bp)
else
appendLogText(i18n("Dark frame processing failed."));
- return;
+ return;
}
FITSView *targetImage = targetChip->getImage(FITS_GUIDE);
@@ -527,7 +537,7 @@ void Guide::newFITS(IBLOB *bp)
}
pmath->set_image(targetImage);
- guider->setImage(targetImage);
+ guider->setImage(targetImage);
//fv->show();
@@ -539,10 +549,11 @@ void Guide::newFITS(IBLOB *bp)
if (isSuspended)
{
//capture();
+
if (Options::guideLogging())
qDebug() << "Guide: Guider is suspended.";
return;
- }
+ }
if (guider->isDithering())
{
@@ -558,7 +569,7 @@ void Guide::newFITS(IBLOB *bp)
{
guider->guide();
- if (guider->isGuiding())
+ if (guider->isGuiding())
capture();
}
else if (calibration->isCalibrating())
@@ -567,14 +578,15 @@ void Guide::newFITS(IBLOB *bp)
pmath->do_processing();
calibration->processCalibration();
- if (calibration->isCalibrationComplete())
- {
- guider->setReady(true);
- tabWidget->setTabEnabled(1, true);
- emit guideReady();
- }
+ if (calibration->isCalibrationComplete())
+ {
+ guider->setReady(true);
+ tabWidget->setTabEnabled(1, true);
+ emit guideReady();
+ }
}
+ emit newStarPixmap(targetImage->getTrackingBoxPixmap());
}
void Guide::appendLogText(const QString &text)
@@ -741,16 +753,16 @@ bool Guide::isDithering()
void Guide::dither()
{
- if (Options::useEkosGuider())
- {
- if (isDithering() == false)
+ if (Options::useEkosGuider())
+ {
+ if (isDithering() == false)
guider->dither();
- }
- else
- {
- if (isDithering() == false)
- phd2->dither(guider->getDitherPixels());
- }
+ }
+ else
+ {
+ if (isDithering() == false)
+ phd2->dither(guider->getDitherPixels());
+ }
}
@@ -773,7 +785,7 @@ void Guide::updateGuideDriver(double delta_ra, double delta_dec)
if (AODriver != NULL && (fabs(delta_ra) < guider->getAOLimit()) && (fabs(delta_dec) < guider->getAOLimit()))
{
if (AODriver != GuideDriver)
- appendLogText(i18n("Using %1 to correct for guiding errors.", AODriver->getDeviceName()));
+ appendLogText(i18n("Using %1 to correct for guiding errors.", AODriver->getDeviceName()));
GuideDriver = AODriver;
return;
}
@@ -873,13 +885,17 @@ void Guide::setSuspended(bool enable)
capture();
else
phd2->resumeGuiding();
- //phd2->startGuiding();
+ //phd2->startGuiding();
}
if (isSuspended)
+ {
appendLogText(i18n("Guiding suspended."));
+ }
else
+ {
appendLogText(i18n("Guiding resumed."));
+ }
}
void Guide::setExposure(double value)
@@ -925,22 +941,22 @@ void Guide::setCalibrationParams(int boxSize, int pulseDuration)
void Guide::setGuideBoxSize(int boxSize)
{
- guider->setGuideOptions(boxSize, guider->getAlgorithm(), guider->useSubFrame(), guider->useRapidGuide());
+ guider->setGuideOptions(boxSize, guider->getAlgorithm(), guider->useSubFrame(), guider->useRapidGuide());
}
void Guide::setGuideAlgorithm(const QString & algorithm)
{
- guider->setGuideOptions(guider->getBoxSize(), algorithm, guider->useSubFrame(), guider->useRapidGuide());
+ guider->setGuideOptions(guider->getBoxSize(), algorithm, guider->useSubFrame(), guider->useRapidGuide());
}
void Guide::setGuideSubFrame(bool enable)
{
- guider->setGuideOptions(guider->getBoxSize(), guider->getAlgorithm(), enable , guider->useRapidGuide());
+ guider->setGuideOptions(guider->getBoxSize(), guider->getAlgorithm(), enable , guider->useRapidGuide());
}
void Guide::setGuideRapid(bool enable)
{
- guider->setGuideOptions(guider->getBoxSize(), guider->getAlgorithm(), guider->useSubFrame() , enable);
+ guider->setGuideOptions(guider->getBoxSize(), guider->getAlgorithm(), guider->useSubFrame() , enable);
}
void Guide::setDither(bool enable, double value)
@@ -985,6 +1001,67 @@ void Guide::checkAutoCalibrateGuiding(bool successful)
}
}
+void Guide::setStatus(Ekos::GuideState newState)
+{
+ if (newState == state)
+ return;
+
+ state = newState;
+
+ emit newStatus(newState);
+}
+
+QString Guide::getStatusString(Ekos::GuideState state)
+{
+
+ switch (state)
+ {
+ case GUIDE_IDLE:
+ return i18n("Idle");
+ break;
+
+ case GUIDE_CALIBRATING:
+ return i18n("Calibrating");
+ break;
+
+ case GUIDE_CALIBRATION_SUCESS:
+ return i18n("Calibration successful");
+ break;
+
+ case GUIDE_CALIBRATION_ERROR:
+ return i18n("Calibration error");
+ break;
+
+ case GUIDE_GUIDING:
+ return i18n("Guiding");
+ break;
+
+ case GUIDE_ABORTED:
+ return i18n("Aborted");
+ break;
+
+
+ case GUIDE_SUSPENDED:
+ return i18n("Suspended");
+ break;
+
+ case GUIDE_DITHERING:
+ return i18n("Dithering");
+ break;
+
+ case GUIDE_DITHERING_SUCCESS:
+ return i18n("Dithering successful");
+ break;
+
+ case GUIDE_DITHERING_ERROR:
+ return i18n("Dithering error");
+ break;
+
+ }
+
+ return i18n("Unknown");
+}
+
void Guide::updateCCDBin(int index)
{
if (currentCCD == NULL && Options::usePHD2Guider())
@@ -1005,7 +1082,7 @@ void Guide::processCCDNumber(INumberVectorProperty *nvp)
binningCombo->disconnect();
binningCombo->setCurrentIndex(nvp->np[0].value-1);
connect(binningCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateCCDBin(int)));
- }
+ }
}
void Guide::checkExposureValue(ISD::CCDChip *targetChip, double exposure, IPState state)
diff --git a/kstars/ekos/guide.h b/kstars/ekos/guide.h
index 9245e1f..3d1411a 100644
--- a/kstars/ekos/guide.h
+++ b/kstars/ekos/guide.h
@@ -13,6 +13,7 @@
#include <QTimer>
#include <QtDBus/QtDBus>
+#include "ekos.h"
#include "guide/common.h"
#include "guide.h"
#include "fitsviewer/fitscommon.h"
@@ -36,7 +37,7 @@ class PHD2;
*@class Guide
*@short Performs calibration and autoguiding using an ST4 port or directly via the INDI driver.
*@author Jasem Mutlaq
- *@version 1.0
+ *@version 1.1
*/
class Guide : public QWidget, public Ui::Guide
{
@@ -49,7 +50,7 @@ public:
~Guide();
enum GuiderStage { CALIBRATION_STAGE, GUIDE_STAGE };
- enum GuiderProcess { GUIDE_INTERNAL, GUIDE_PHD2 };
+ enum GuiderProcess { GUIDE_INTERNAL, GUIDE_PHD2 };
/** @defgroup GuideDBusInterface Ekos DBus Interface - Capture Module
* Ekos::Guide interface provides advanced scripting capabilities to calibrate and guide a mount via a CCD camera.
@@ -208,6 +209,8 @@ public:
void startRapidGuide();
void stopRapidGuide();
+ static QString getStatusString(Ekos::GuideState state);
+
public slots:
/** DBUS interface function.
@@ -259,6 +262,8 @@ public slots:
void appendLogText(const QString &);
+ void setStatus(Ekos::GuideState newState);
+
protected slots:
void updateCCDBin(int index);
@@ -275,6 +280,11 @@ protected slots:
signals:
void newLog();
+ void newStatus(Ekos::GuideState status);
+
+ void newStarPixmap(QPixmap &);
+ void newProfilePixmap(QPixmap &);
+
void guideReady();
void newAxisDelta(double delta_ra, double delta_dec);
void autoGuidingToggled(bool);
@@ -320,6 +330,7 @@ private:
double ccd_hor_pixel, ccd_ver_pixel, focal_length, aperture, guideDeviationRA, guideDeviationDEC;
bool rapidGuideReticleSet;
+ GuideState state;
};
}
diff --git a/kstars/ekos/guide/gmath.cpp b/kstars/ekos/guide/gmath.cpp
index c920573..1915266 100644
--- a/kstars/ekos/guide/gmath.cpp
+++ b/kstars/ekos/guide/gmath.cpp
@@ -358,7 +358,10 @@ void cgmath::move_square( double newx, double newy )
// FITS Image takes center coords
if (guide_frame)
- guide_frame->setGuideSquare(square_pos.x+square_size/2, square_pos.y+square_size/2);
+ {
+ guide_frame->setTrackingBoxEnabled(true);
+ guide_frame->setTrackingBoxCenter(QPointF(square_pos.x+square_size/2, square_pos.y+square_size/2));
+ }
}
@@ -373,7 +376,10 @@ void cgmath::resize_square( int size_idx )
// check position
if (guide_frame)
- guide_frame->setGuideBoxSize(square_size);
+ {
+ guide_frame->setTrackingBoxEnabled(true);
+ guide_frame->setTrackingBoxSize(QSize(square_size,square_size));
+ }
}
diff --git a/kstars/ekos/guide/guider.cpp b/kstars/ekos/guide/guider.cpp
index 9a6d67a..8eb5f94 100644
--- a/kstars/ekos/guide/guider.cpp
+++ b/kstars/ekos/guide/guider.cpp
@@ -387,7 +387,7 @@ bool rguider::start()
Options::setDECMinimumPulse(ui.spinBox_MinPulseDEC->value());
if (guideFrame)
- disconnect(guideFrame, SIGNAL(guideStarSelected(int,int)), 0, 0);
+ disconnect(guideFrame, SIGNAL(trackingStarSelected(int,int)), 0, 0);
// Let everyone know about dither option status
emit ditherToggled(ui.ditherCheck->isChecked());
@@ -427,6 +427,8 @@ bool rguider::start()
pmain_wnd->startRapidGuide();
emit autoGuidingToggled(true);
+ // FIXME use only one signal, remove the previous one
+ emit newStatus(Ekos::GUIDE_GUIDING);
pmain_wnd->setSuspended(false);
@@ -447,7 +449,7 @@ bool rguider::stop()
if (phd2)
{
ui.pushButton_StartStop->setText( i18n("Start Autoguide") );
- emit autoGuidingToggled(false);
+ emit autoGuidingToggled(false);
m_isDithering = false;
m_isStarted = false;
@@ -456,7 +458,7 @@ bool rguider::stop()
}
if (guideFrame)
- connect(guideFrame, SIGNAL(guideStarSelected(int,int)), this, SLOT(guideStarSelected(int,int)));
+ connect(guideFrame, SIGNAL(trackingStarSelected(int,int)), this, SLOT(trackingStarSelected(int,int)));
ui.pushButton_StartStop->setText( i18n("Start Autoguide") );
pmain_wnd->appendLogText(i18n("Autoguiding stopped."));
pmath->stop();
@@ -470,6 +472,8 @@ bool rguider::stop()
pmain_wnd->stopRapidGuide();
emit autoGuidingToggled(false);
+ // FIXME use only one signal, remove the previous one
+ emit newStatus(Ekos::GUIDE_IDLE);
m_isDithering = false;
m_isStarted = false;
@@ -545,7 +549,7 @@ void rguider::capture()
targetChip->setFrame(x, y, w, h);
- guideStarSelected(w/binx/2, h/biny/2);
+ trackingStarSelected(w/binx/2, h/biny/2);
}
else if (ui.subFrameCheck->isChecked() == false/* && is_subframed == true*/)
{
@@ -661,6 +665,8 @@ void rguider::guide( void )
drift_graph->on_paint();
pDriftOut->update();
+ profilePixmap = pDriftOut->grab(QRect(QPoint(0, 100), QSize(pDriftOut->width(), 101)));
+ emit newProfilePixmap(profilePixmap);
}
void rguider::setImage(FITSView *image)
@@ -668,17 +674,17 @@ void rguider::setImage(FITSView *image)
guideFrame = image;
if (m_isReady && guideFrame && m_isStarted == false)
- connect(guideFrame, SIGNAL(guideStarSelected(int,int)), this, SLOT(guideStarSelected(int, int)));
+ connect(guideFrame, SIGNAL(trackingStarSelected(int,int)), this, SLOT(trackingStarSelected(int, int)));
}
-void rguider::guideStarSelected(int x, int y)
+void rguider::trackingStarSelected(int x, int y)
{
int square_size = guide_squares[pmath->get_square_index()].size;
pmath->set_reticle_params(x, y, pmain_wnd->getReticleAngle());
pmath->move_square(x-square_size/2, y-square_size/2);
- //disconnect(pimage, SIGNAL(guideStarSelected(int,int)), this, SLOT(guideStarSelected(int, int)));
+ //disconnect(pimage, SIGNAL(trackingStarSelected(int,int)), this, SLOT(trackingStarSelected(int, int)));
}
diff --git a/kstars/ekos/guide/guider.h b/kstars/ekos/guide/guider.h
index d7770b6..352d188 100644
--- a/kstars/ekos/guide/guider.h
+++ b/kstars/ekos/guide/guider.h
@@ -81,7 +81,7 @@ protected slots:
void onInputParamChanged();
void onRapidGuideChanged(bool enable);
void capture();
- void guideStarSelected(int x, int y);
+ void trackingStarSelected(int x, int y);
void onStartStopButtonClick();
void onSetDECSwap(bool enable);
@@ -89,6 +89,8 @@ signals:
void ditherComplete();
void ditherToggled(bool);
void autoGuidingToggled(bool);
+ void newStatus(Ekos::GuideState);
+ void newProfilePixmap(QPixmap &);
private:
cgmath *pmath;
@@ -111,6 +113,7 @@ private:
double ret_x, ret_y, ret_angle;
bool m_isDithering;
QFile logFile;
+ QPixmap profilePixmap;
private:
Ui::guiderClass ui;
diff --git a/kstars/ekos/guide/rcalibration.cpp b/kstars/ekos/guide/rcalibration.cpp
index 6e9a7bd..eb6d6e8 100644
--- a/kstars/ekos/guide/rcalibration.cpp
+++ b/kstars/ekos/guide/rcalibration.cpp
@@ -255,6 +255,9 @@ bool rcalibration::stopCalibration()
return false;
calibrationStage = CAL_ERROR;
+
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
+
reset();
return true;
@@ -305,11 +308,13 @@ bool rcalibration::startCalibration()
}
if (pmath->get_image())
- disconnect(pmath->get_image(), SIGNAL(guideStarSelected(int,int)), this, SLOT(guideStarSelected(int, int)));
+ disconnect(pmath->get_image(), SIGNAL(trackingStarSelected(int,int)), this, SLOT(trackingStarSelected(int, int)));
ui.captureLED->setColor(okColor);
ui.selectStarLED->setColor(okColor);
+
calibrationStage = CAL_START;
+ emit newStatus(Ekos::GUIDE_CALIBRATING);
// Must reset dec swap before we run any calibration procedure!
pmain_wnd->setDECSwap(false);
@@ -335,7 +340,7 @@ bool rcalibration::startCalibration()
return true;
}
- ui.progressBar->setVisible(true);
+ ui.progressBar->setVisible(true);
// automatic
if( ui.twoAxisCheck->checkState() == Qt::Checked )
@@ -349,11 +354,13 @@ bool rcalibration::startCalibration()
void rcalibration::processCalibration()
{
if (pmath->get_image())
- pmath->get_image()->setGuideBoxSize(pmath->get_square_size());
+ pmath->get_image()->setTrackingBoxSize(QSize(pmath->get_square_size(), pmath->get_square_size()));
if (pmath->is_lost_star())
{
calibrationStage = CAL_ERROR;
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
+
ui.startCalibrationLED->setColor(alertColor);
KMessageBox::error(NULL, i18n("Lost track of the guide star. Try increasing the square size or reducing pulse duration."));
reset();
@@ -393,7 +400,7 @@ void rcalibration::reset()
ui.pushButton_StartCalibration->setText( i18n("Start") );
ui.startCalibrationLED->setColor(idleColor);
ui.progressBar->setVisible(false);
- connect(pmath->get_image(), SIGNAL(guideStarSelected(int,int)), this, SLOT(guideStarSelected(int, int)));
+ connect(pmath->get_image(), SIGNAL(trackingStarSelected(int,int)), this, SLOT(trackingStarSelected(int, int)));
}
void rcalibration::calibrateManualReticle( void )
@@ -455,7 +462,10 @@ void rcalibration::calibrateManualReticle( void )
KNotification::event( QLatin1String( "CalibrationSuccessful" ) , i18n("Guiding calibration completed successfully"));
calibrationStage = CAL_FINISH;
+
emit calibrationCompleted(true);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_SUCESS);
pmain_wnd->setDECSwap(dec_swap);
}
@@ -465,6 +475,8 @@ void rcalibration::calibrateManualReticle( void )
is_started = false;
calibrationStage = CAL_ERROR;
emit calibrationCompleted(false);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
}
}
}
@@ -477,13 +489,21 @@ void rcalibration::calibrateManualReticle( void )
calibrationStage = CAL_FINISH;
fillInterface();
pmain_wnd->appendLogText(i18n("Calibration completed."));
+
emit calibrationCompleted(true);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_SUCESS);
+
KNotification::event( QLatin1String( "CalibrationSuccessful" ) , i18n("Guiding calibration completed successfully"));
}
else
{
calibrationStage = CAL_ERROR;
- emit calibrationCompleted(false);
+
+ emit calibrationCompleted(false);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
+
QMessageBox::warning( this, i18n("Error"), i18n("Calibration rejected. Start drift is too short."), QMessageBox::Ok );
is_started = false;
KNotification::event( QLatin1String( "CalibrationFailed" ) , i18n("Guiding calibration failed with errors"));
@@ -634,7 +654,11 @@ void rcalibration::calibrateRADECRecticle( bool ra_only )
}
calibrationStage = CAL_ERROR;
+
emit calibrationCompleted(false);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
+
if (ui.autoStarCheck->isChecked())
pmain_wnd->appendLogText(i18np("GUIDE_RA: Scope cannot reach the start point after %1 iteration. Possible mount or drive problems...", "GUIDE_RA: Scope cannot reach the start point after %1 iterations. Possible mount or drive problems...", turn_back_time));
else
@@ -678,7 +702,11 @@ void rcalibration::calibrateRADECRecticle( bool ra_only )
calibrationStage = CAL_FINISH;
fillInterface();
pmain_wnd->appendLogText(i18n("Calibration completed."));
+
emit calibrationCompleted(true);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_SUCESS);
+
ui.startCalibrationLED->setColor(okColor);
KNotification::event( QLatin1String( "CalibrationFailed" ) , i18n("Guiding calibration failed with errors"));
if (ui.autoStarCheck->isChecked())
@@ -692,7 +720,11 @@ void rcalibration::calibrateRADECRecticle( bool ra_only )
QMessageBox::warning( this, i18n("Error"), i18n("Calibration rejected. Star drift is too short."), QMessageBox::Ok );
ui.startCalibrationLED->setColor(alertColor);
calibrationStage = CAL_ERROR;
+
emit calibrationCompleted(false);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
+
KNotification::event( QLatin1String( "CalibrationFailed" ) , i18n("Guiding calibration failed with errors"));
}
@@ -785,7 +817,11 @@ void rcalibration::calibrateRADECRecticle( bool ra_only )
}
calibrationStage = CAL_ERROR;
+
emit calibrationCompleted(false);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
+
if (ui.autoStarCheck->isChecked())
pmain_wnd->appendLogText(i18np("GUIDE_DEC: Scope cannot reach the start point after %1 iteration.\nPossible mount or drive problems...", "GUIDE_DEC: Scope cannot reach the start point after %1 iterations.\nPossible mount or drive problems...", turn_back_time));
else
@@ -807,7 +843,11 @@ void rcalibration::calibrateRADECRecticle( bool ra_only )
else
pmain_wnd->appendLogText(i18n("DEC swap disabled."));
pmain_wnd->appendLogText(i18n("Calibration completed."));
+
emit calibrationCompleted(true);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_SUCESS);
+
ui.startCalibrationLED->setColor(okColor);
pmain_wnd->setDECSwap(swap_dec);
@@ -823,7 +863,11 @@ void rcalibration::calibrateRADECRecticle( bool ra_only )
pmain_wnd->appendLogText(i18n("Calibration rejected. Star drift is too short."));
else
QMessageBox::warning( this, i18n("Error"), i18n("Calibration rejected. Star drift is too short."), QMessageBox::Ok );
+
emit calibrationCompleted(false);
+ // FIXME Just one signal is enough. Remove previous signal
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
+
ui.startCalibrationLED->setColor(alertColor);
calibrationStage = CAL_ERROR;
KNotification::event( QLatin1String( "CalibrationFailed" ) , i18n("Guiding calibration failed with errors"));
@@ -842,7 +886,7 @@ void rcalibration::calibrateRADECRecticle( bool ra_only )
}
-void rcalibration::guideStarSelected(int x, int y)
+void rcalibration::trackingStarSelected(int x, int y)
{
int square_size = guide_squares[pmath->get_square_index()].size;
@@ -880,6 +924,7 @@ void rcalibration::capture()
{
ui.captureLED->setColor(alertColor);
calibrationStage = CAL_ERROR;
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
}
}
@@ -907,11 +952,11 @@ bool rcalibration::setImage(FITSView *image)
if (ui.autoStarCheck->isChecked())
{
- guideStarSelected(star.first, star.second);
+ trackingStarSelected(star.first, star.second);
return false;
}
else
- connect(guideFrame, SIGNAL(guideStarSelected(int,int)), this, SLOT(guideStarSelected(int, int)));
+ connect(guideFrame, SIGNAL(trackingStarSelected(int,int)), this, SLOT(trackingStarSelected(int, int)));
}
break;
diff --git a/kstars/ekos/guide/rcalibration.h b/kstars/ekos/guide/rcalibration.h
index 6375eb7..865922c 100644
--- a/kstars/ekos/guide/rcalibration.h
+++ b/kstars/ekos/guide/rcalibration.h
@@ -87,10 +87,11 @@ protected slots:
public slots:
void capture();
- void guideStarSelected(int x, int y);
+ void trackingStarSelected(int x, int y);
signals:
void calibrationCompleted(bool);
+ void newStatus(Ekos::GuideState state);
private:
diff --git a/kstars/ekos/phd2.cpp b/kstars/ekos/phd2.cpp
index cad4038..a071e8f 100644
--- a/kstars/ekos/phd2.cpp
+++ b/kstars/ekos/phd2.cpp
@@ -254,6 +254,7 @@ void PHD2::processPHD2Event(const QJsonObject &jsonEvent)
emit newLog(i18n("PHD2: Calibration Complete."));
emit calibrationCompleted(true);
emit guideReady();
+ emit newStatus(Ekos::GUIDE_CALIBRATION_SUCESS);
break;
case StartGuiding:
@@ -265,16 +266,19 @@ void PHD2::processPHD2Event(const QJsonObject &jsonEvent)
}
emit newLog(i18n("PHD2: Guiding Started."));
emit autoGuidingToggled(true);
+ emit newStatus(Ekos::GUIDE_GUIDING);
break;
case Paused:
state = PAUSED;
emit newLog(i18n("PHD2: Guiding Paused."));
+ emit newStatus(Ekos::GUIDE_SUSPENDED);
break;
case StartCalibration:
state = CALIBRATING;
emit newLog(i18n("PHD2: Calibration Started."));
+ emit newStatus(Ekos::GUIDE_CALIBRATING);
break;
case AppState:
@@ -285,6 +289,7 @@ void PHD2::processPHD2Event(const QJsonObject &jsonEvent)
state = CALIBRATION_FAILED;
emit newLog(i18n("PHD2: Calibration Failed (%1).", jsonEvent["Reason"].toString()));
emit calibrationCompleted(false);
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
break;
case CalibrationDataFlipped:
@@ -339,15 +344,18 @@ void PHD2::processPHD2Event(const QJsonObject &jsonEvent)
case StarLost:
emit newLog(i18n("PHD2: Star Lost."));
+ emit newStatus(Ekos::GUIDE_ABORTED);
break;
case GuidingStopped:
emit newLog(i18n("PHD2: Guiding Stopped."));
emit autoGuidingToggled(false);
+ emit newStatus(Ekos::GUIDE_IDLE);
break;
case Resumed:
emit newLog(i18n("PHD2: Guiding Resumed."));
+ emit newStatus(Ekos::GUIDE_GUIDING);
state = GUIDING;
break;
@@ -366,6 +374,7 @@ void PHD2::processPHD2Event(const QJsonObject &jsonEvent)
case GuidingDithered:
emit newLog(i18n("PHD2: Guide Dithering."));
+ emit newStatus(Ekos::GUIDE_DITHERING);
break;
case LockPositionSet:
@@ -374,6 +383,7 @@ void PHD2::processPHD2Event(const QJsonObject &jsonEvent)
case LockPositionLost:
emit newLog(i18n("PHD2: Lock Position Lost."));
+ emit newStatus(Ekos::GUIDE_CALIBRATION_ERROR);
break;
case Alert:
diff --git a/kstars/ekos/phd2.h b/kstars/ekos/phd2.h
index ddb5c1d..efb6b76 100644
--- a/kstars/ekos/phd2.h
+++ b/kstars/ekos/phd2.h
@@ -13,13 +13,13 @@
#include <QAbstractSocket>
#include <QJsonArray>
+#include "guide.h"
+
class QTcpSocket;
namespace Ekos
{
-class Guide;
-
/**
* @class PHD2
* Uses external PHD2 for guiding.
@@ -77,6 +77,7 @@ signals:
void newAxisDelta(double delta_ra, double delta_dec);
void autoGuidingToggled(bool);
void guideReady();
+ void newStatus(Ekos::GuideState);
private:
diff --git a/kstars/fitsviewer/fitsviewer.h b/kstars/fitsviewer/fitsviewer.h
index 996e6a2..619c25c 100644
--- a/kstars/fitsviewer/fitsviewer.h
+++ b/kstars/fitsviewer/fitsviewer.h
@@ -133,7 +133,7 @@ private:
QUrl lastURL;
signals:
- void guideStarSelected(int x, int y);
+ void trackingStarSelected(int x, int y);
};
#endif
diff --git a/kstars/indi/indiccd.cpp b/kstars/indi/indiccd.cpp
index 9a3a862..8454068 100644
--- a/kstars/indi/indiccd.cpp
+++ b/kstars/indi/indiccd.cpp
@@ -1307,6 +1307,8 @@ void CCD::processBLOB(IBLOB* bp)
{
focusTabID = tabRC;
targetChip->setImage(fv->getView(focusTabID), FITS_FOCUS);
+
+ emit newImage(fv->getView(focusTabID)->getDisplayImage());
}
else
emit newExposureValue(targetChip, 0, IPS_ALERT);
@@ -1327,6 +1329,8 @@ void CCD::processBLOB(IBLOB* bp)
{
guideTabID = tabRC;
targetChip->setImage(fv->getView(guideTabID), FITS_GUIDE);
+
+ emit newImage(fv->getView(guideTabID)->getDisplayImage());
}
else
emit newExposureValue(targetChip, 0, IPS_ALERT);
diff --git a/kstars/org.kde.kstars.Ekos.Capture.xml b/kstars/org.kde.kstars.Ekos.Capture.xml
index 5ebb159..5401df3 100644
--- a/kstars/org.kde.kstars.Ekos.Capture.xml
+++ b/kstars/org.kde.kstars.Ekos.Capture.xml
@@ -81,6 +81,15 @@
<arg type="b" direction="out"/>
<arg type="b" name="enable" direction="in"/>
</method>
+ <method name="getActiveJobID">
+ <arg type="i" direction="out"/>
+ </method>
+ <method name="getActiveJobRemainingTime">
+ <arg type="i" direction="out"/>
+ </method>
+ <method name="getOverallRemainingTime">
+ <arg type="i" direction="out"/>
+ </method>
<method name="clearAutoFocusHFR">
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
</method>