Commit ba36ebdd authored by Jasem Mutlaq's avatar Jasem Mutlaq

Fix signal/slot connection. Disabled selecting autostar after calibration as...

Fix signal/slot connection. Disabled selecting autostar after calibration as guide would do it anyway
parent c547d10a
......@@ -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;
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
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