Commit ad7de0d6 authored by Artem Fedoskin's avatar Artem Fedoskin
Browse files

Merge branch 'master' of git://anongit.kde.org/kstars

parents 6b9087d7 8c481c8f
......@@ -1895,6 +1895,19 @@ void Align::saveSettleTime()
Options::setSettlingTime(delaySpin->value());
}
void Align::setCaptureStatus(CaptureState newState)
{
switch (newState)
{
case CAPTURE_ALIGNING:
QTimer::singleShot(Options::settlingTime(), this, SLOT(captureAndSolve()));
break;
default:
break;
}
}
}
......@@ -279,6 +279,9 @@ public slots:
// Capture
void setCaptureComplete();
// Update Capture Module status
void setCaptureStatus(Ekos::CaptureState newState);
private slots:
/* Solver Options */
void checkLineEdits();
......
......@@ -1403,16 +1403,11 @@ void EkosManager::initCapture()
if (alignProcess)
{
// Alignment flag
//connect(alignProcess, SIGNAL(solverComplete(bool)), captureProcess, SLOT(enableAlignmentFlag()), Qt::UniqueConnection);
//connect(alignProcess, SIGNAL(solverSlewComplete()), captureProcess, SLOT(checkAlignmentSlewComplete()), Qt::UniqueConnection);
// Alignment flag
connect(alignProcess, SIGNAL(newStatus(Ekos::AlignState)), captureProcess, SLOT(setAlignStatus(Ekos::AlignState)), Qt::UniqueConnection);
// Meridian Flip
//connect(captureProcess, SIGNAL(meridialFlipTracked()), alignProcess, SLOT(captureAndSolve()), Qt::UniqueConnection);
connect(captureProcess, &Ekos::Capture::newStatus, this, [&](Ekos::CaptureState state){if (state == Ekos::CAPTURE_ALIGNING)
{QTimer::singleShot(Options::settlingTime(), alignProcess, SLOT(captureAndSolve()));}}, Qt::UniqueConnection);
// Capture Status
connect(captureProcess, SIGNAL(newStatus(Ekos::CaptureState)), alignProcess, SLOT(setCaptureStatus(Ekos::CaptureState)), Qt::UniqueConnection);
}
......@@ -1443,17 +1438,10 @@ void EkosManager::initAlign()
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);
// Align Status
connect(alignProcess, SIGNAL(newStatus(Ekos::AlignState)), captureProcess, SLOT(setAlignStatus(Ekos::AlignState)), Qt::UniqueConnection);
connect(captureProcess, &Ekos::Capture::newStatus, this, [&](Ekos::CaptureState state){if (state == Ekos::CAPTURE_ALIGNING)
{QTimer::singleShot(Options::settlingTime(), alignProcess, SLOT(captureAndSolve()));}}, Qt::UniqueConnection);
// Capture Status
connect(captureProcess, SIGNAL(newStatus(Ekos::CaptureState)), alignProcess, SLOT(setCaptureStatus(Ekos::CaptureState)), Qt::UniqueConnection);
}
if (focusProcess)
......@@ -1537,8 +1525,7 @@ void EkosManager::initMount()
if (guideProcess)
{
connect(mountProcess, &Ekos::Mount::newStatus, this, [&](ISD::Telescope::TelescopeStatus state){if (state == ISD::Telescope::MOUNT_PARKING)
guideProcess->abort();}, Qt::UniqueConnection);
connect(mountProcess, SIGNAL(newStatus(ISD::Telescope::TelescopeStatus)), guideProcess, SLOT(setMountStatus(ISD::Telescope::TelescopeStatus)), Qt::UniqueConnection);
}
}
......@@ -1580,15 +1567,7 @@ void EkosManager::initGuide()
connect(guideProcess, SIGNAL(newAxisDelta(double,double)), captureProcess, SLOT(setGuideDeviation(double,double)));
// Dithering
//connect(guideProcess, SIGNAL(autoGuidingToggled(bool)), captureProcess, SLOT(setAutoguiding(bool)));
//connect(guideProcess, SIGNAL(ditherComplete()), captureProcess, SLOT(resumeCapture()));
//connect(guideProcess, SIGNAL(ditherFailed()), captureProcess, SLOT(abort()));
//connect(guideProcess, SIGNAL(ditherToggled(bool)), captureProcess, SLOT(setGuideDither(bool)));
//connect(captureProcess, SIGNAL(exposureComplete()), guideProcess, SLOT(dither()));
//connect(captureProcess, SIGNAL(exposureComplete()), guideProcess, SLOT(dither()));
connect(captureProcess, &Ekos::Capture::newStatus, this, [&](Ekos::CaptureState state){if (state == Ekos::CAPTURE_DITHERING)
{guideProcess->dither();}}, Qt::UniqueConnection);
connect(captureProcess, SIGNAL(newStatus(Ekos::CaptureState)), guideProcess, SLOT(setCaptureStatus(Ekos::CaptureState)), Qt::UniqueConnection);
// Guide Head
......@@ -1604,10 +1583,7 @@ void EkosManager::initGuide()
if (mountProcess)
{
// Parking
//connect(captureProcess, SIGNAL(mountParking()), guideProcess, SLOT(stopGuiding()));
connect(mountProcess, &Ekos::Mount::newStatus, this, [&](ISD::Telescope::TelescopeStatus state){if (state == ISD::Telescope::MOUNT_PARKING)
guideProcess->abort();}, Qt::UniqueConnection);
connect(mountProcess, SIGNAL(newStatus(ISD::Telescope::TelescopeStatus)), guideProcess, SLOT(setMountStatus(ISD::Telescope::TelescopeStatus)), Qt::UniqueConnection);
}
if (focusProcess)
......
......@@ -992,6 +992,9 @@ bool Guide::guide()
bool Guide::dither()
{
if (state == GUIDE_DITHERING)
return true;
if (guiderType == GUIDE_INTERNAL)
{
if (state != GUIDE_GUIDING)
......@@ -1025,6 +1028,32 @@ bool Guide::resume()
return false;
}
void Guide::setCaptureStatus(CaptureState newState)
{
switch (newState)
{
case CAPTURE_DITHERING:
dither();
break;
default:
break;
}
}
void Guide::setMountStatus(ISD::Telescope::TelescopeStatus newState)
{
switch (newState)
{
case ISD::Telescope::MOUNT_PARKING:
abort();
break;
default:
break;
}
}
void Guide::setExposure(double value)
{
exposureIN->setValue(value);
......@@ -1242,11 +1271,11 @@ void Guide::processCCDNumber(INumberVectorProperty *nvp)
}
}
void Guide::checkExposureValue(ISD::CCDChip *targetChip, double exposure, IPState state)
void Guide::checkExposureValue(ISD::CCDChip *targetChip, double exposure, IPState expState)
{
INDI_UNUSED(exposure);
if (state == IPS_ALERT && (state == GUIDE_GUIDING) || (state == GUIDE_DITHERING) || (state == GUIDE_CALIBRATING))
if (expState == IPS_ALERT && ( (state == GUIDE_GUIDING) || (state == GUIDE_DITHERING) || (state == GUIDE_CALIBRATING)) )
{
appendLogText(i18n("Exposure failed. Restarting exposure..."));
targetChip->capture(exposureIN->value());
......
......@@ -283,7 +283,7 @@ public slots:
* @param exposure numbers of seconds left in the exposure
* @param state State of the exposure property
*/
void checkExposureValue(ISD::CCDChip *targetChip, double exposure, IPState state);
void checkExposureValue(ISD::CCDChip *targetChip, double exposure, IPState expState);
/**
* @brief newFITS is called by the INDI framework whenever there is a new BLOB arriving
......@@ -311,6 +311,11 @@ public slots:
// Update Guide module status
void setStatus(Ekos::GuideState newState);
// Update Capture Module status
void setCaptureStatus(Ekos::CaptureState newState);
// Update Mount module status
void setMountStatus(ISD::Telescope::TelescopeStatus newState);
// Star Position
void setStarPosition(const QVector3D &newCenter, bool updateNow);
......
......@@ -25,6 +25,8 @@
#include <QDebug>
#include <QScrollArea>
#include <KLocalizedString>
/*******************************************************************
** INDI Group: a tab widget for common properties. All properties
** belong to a group, whether they have one or not but how the group
......@@ -33,7 +35,7 @@
INDI_G::INDI_G(INDI_D *idv, const QString &inName)
{
dp = idv;
name = inName;
name = (inName.isEmpty()) ? i18n("Unknown") : inName;
propertyContainer = new QFrame(idv);
propertyLayout = new QVBoxLayout(propertyContainer);
......@@ -78,8 +80,6 @@ bool INDI_G::addProperty(INDI::Property *prop)
bool INDI_G::removeProperty(const QString &probName)
{
foreach(INDI_P * pp, propList)
{
if (pp->getName() == probName)
......
......@@ -463,7 +463,13 @@ Vector2f Projector::toScreenVec(const SkyPoint* o, bool oRefract, bool* onVisibl
Y = o->dec().radians();
}
if( !( std::isfinite( Y ) && std::isfinite( dX ) ) ) {
if( !( std::isfinite( Y ) && std::isfinite( dX ) ) )
{
return Vector2f(0,0);
// JM: Enable this again later when trying to find a solution for it
// As it is now creating too much noise in the log file.
/*
qDebug() << "Assert in Projector::toScreenVec failed!";
qDebug() << "using AltAz?" << m_vp.useAltAz << " Refract? " << oRefract;
const SkyObject *obj;
......@@ -473,8 +479,9 @@ Vector2f Projector::toScreenVec(const SkyPoint* o, bool oRefract, bool* onVisibl
}
qDebug() << "dX = " << dX << " and isfinite(dX) is" << std::isfinite(dX);
qDebug() << "Y = " << Y << " and isfinite(Y) is" << std::isfinite(Y);
return Vector2f(0,0);
//Q_ASSERT( false );
*/
}
dX = KSUtils::reduceAngle(dX, -dms::PI, dms::PI);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment