summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-09-14 00:33:58 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-09-14 00:33:58 (GMT)
commitba36ebdd43b36cd9da0d76afe54a99a4496cd44a (patch)
treea7d01816ee4f85e0632133ee88e779cee10aa40a
parentc547d10afc7021343a0b43c6fdea47160a3c96e2 (diff)
Fix signal/slot connection. Disabled selecting autostar after calibration as guide would do it anyway
-rw-r--r--kstars/ekos/guide.cpp8
-rw-r--r--kstars/ekos/guide.h2
-rw-r--r--kstars/ekos/guide/guider.cpp13
-rw-r--r--kstars/ekos/guide/rcalibration.cpp8
4 files changed, 13 insertions, 18 deletions
diff --git a/kstars/ekos/guide.cpp b/kstars/ekos/guide.cpp
index 8a4a17e..f8c42d5 100644
--- a/kstars/ekos/guide.cpp
+++ b/kstars/ekos/guide.cpp
@@ -986,16 +986,14 @@ QList<double> Guide::getGuidingDeviation()
void Guide::startAutoCalibrateGuiding()
{
if (Options::useEkosGuider())
- //connect(calibration, SIGNAL(calibrationCompleted(bool)), this, SLOT(checkAutoCalibrateGuiding(bool)));
- connect(calibration, SIGNAL(newStatus(GuideState)), this, SLOT(checkAutoCalibrateGuiding(GuideState)));
+ connect(calibration, SIGNAL(newStatus(Ekos::GuideState)), this, SLOT(checkAutoCalibrateGuiding(Ekos::GuideState)));
else
- //connect(phd2, SIGNAL(calibrationCompleted(bool)), this, SLOT(checkAutoCalibrateGuiding(bool)));
- connect(phd2, SIGNAL(newStatus(GuideState)), this, SLOT(checkAutoCalibrateGuiding(GuideState)));
+ connect(phd2, SIGNAL(newStatus(Ekos::GuideState)), this, SLOT(checkAutoCalibrateGuiding(Ekos::GuideState)));
startCalibration();
}
-void Guide::checkAutoCalibrateGuiding(GuideState state)
+void Guide::checkAutoCalibrateGuiding(Ekos::GuideState state)
{
if (state < GUIDE_CALIBRATION_SUCESS || state > GUIDE_CALIBRATION_ERROR)
return;
diff --git a/kstars/ekos/guide.h b/kstars/ekos/guide.h
index 236b610..0642ddf 100644
--- a/kstars/ekos/guide.h
+++ b/kstars/ekos/guide.h
@@ -264,7 +264,7 @@ public slots:
// Auto Calibration Guiding (Cablirate first then start guiding immediately)
void startAutoCalibrateGuiding();
- void checkAutoCalibrateGuiding(GuideState state);
+ void checkAutoCalibrateGuiding(Ekos::GuideState state);
void dither();
void setSuspended(bool enable);
diff --git a/kstars/ekos/guide/guider.cpp b/kstars/ekos/guide/guider.cpp
index b9a7ce2..bfc63ce 100644
--- a/kstars/ekos/guide/guider.cpp
+++ b/kstars/ekos/guide/guider.cpp
@@ -575,8 +575,7 @@ void internalGuider::guide( void )
uint32_t tick = 0;
double drift_x = 0, drift_y = 0;
-
- assert( pmath );
+ Q_ASSERT( pmath );
if (first_subframe)
{
@@ -588,13 +587,11 @@ void internalGuider::guide( void )
if (m_isDithering == false)
{
Vector star_pos = pmath->findLocalStarPosition();
- double ret_x,ret_y,ret_angle;
- int binx=1,biny=1;
- targetChip->getBinning(&binx, &biny);
- pmath->getReticleParameters(&ret_x, &ret_y, &ret_angle);
+ pmath->setReticleParameters(star_pos.x, star_pos.y, -1);
+
//pmath->moveSquare( round(star_pos.x) - (double)square_size/(2*binx), round(star_pos.y) - (double)square_size/(2*biny) );
- pmath->setReticleParameters(star_pos.x, star_pos.y, ret_angle);
+
}
first_frame=false;
}
@@ -607,8 +604,8 @@ void internalGuider::guide( void )
if (pmath->isStarLost() && ++m_lostStarTries > 2)
{
+ guideModule->appendLogText(i18n("Lost track of the guide star. Try increasing the square size and check the mount."));
onStartStopButtonClick();
- KMessageBox::error(NULL, i18n("Lost track of the guide star. Try increasing the square size and check the mount."));
return;
}
else
diff --git a/kstars/ekos/guide/rcalibration.cpp b/kstars/ekos/guide/rcalibration.cpp
index 6a66914..7fbe1b9 100644
--- a/kstars/ekos/guide/rcalibration.cpp
+++ b/kstars/ekos/guide/rcalibration.cpp
@@ -666,8 +666,8 @@ void internalCalibration::calibrateRADECRecticle( bool ra_only )
ui.startCalibrationLED->setColor(okColor);
KNotification::event( QLatin1String( "CalibrationSuccessful" ) , i18n("Guiding calibration completed successfully"));
- if (ui.autoStarCheck->isChecked())
- guideModule->selectAutoStar();
+ //if (ui.autoStarCheck->isChecked())
+ //guideModule->selectAutoStar();
}
else
{
@@ -804,8 +804,8 @@ void internalCalibration::calibrateRADECRecticle( bool ra_only )
KNotification::event( QLatin1String( "CalibrationSuccessful" ) , i18n("Guiding calibration completed successfully"));
- if (ui.autoStarCheck->isChecked())
- guideModule->selectAutoStar();
+ //if (ui.autoStarCheck->isChecked())
+ //guideModule->selectAutoStar();
}
else