[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kstars] kstars/ekos/guide: Be more tolerant if star is lost initially
From: Jasem Mutlaq <mutlaqja () ikarustech ! com>
Date: 2012-10-15 14:13:42
Message-ID: 20121015141342.569CCA6078 () git ! kde ! org
[Download RAW message or body]
Git commit 89e038e9f569654f5d8f82eecfde37526b700294 by Jasem Mutlaq.
Committed on 15/10/2012 at 16:11.
Pushed by mutlaqja into branch 'master'.
Be more tolerant if star is lost initially
M +4 -1 kstars/ekos/guide/guider.cpp
M +1 -0 kstars/ekos/guide/guider.h
http://commits.kde.org/kstars/89e038e9f569654f5d8f82eecfde37526b700294
diff --git a/kstars/ekos/guide/guider.cpp b/kstars/ekos/guide/guider.cpp
index eb534d8..7f06ee2 100644
--- a/kstars/ekos/guide/guider.cpp
+++ b/kstars/ekos/guide/guider.cpp
@@ -35,6 +35,8 @@ rguider::rguider(Ekos::Guide *parent)
pimage = NULL;
+ lost_star_try=0;
+
ui.comboBox_SquareSize->clear();
for( i = 0;guide_squares[i].size != -1;i++ )
ui.comboBox_SquareSize->addItem( QString().setNum( guide_squares[i].size ) );
@@ -357,6 +359,7 @@ void rguider::onStartStopButtonClick()
ui.pushButton_StartStop->setText( i18n("Stop") );
pmain_wnd->appendLogText(i18n("Autoguiding started."));
pmath->start();
+ lost_star_try=0;
is_started = true;
pmain_wnd->capture();
}
@@ -393,7 +396,7 @@ void rguider::guide( void )
if( !isVisible() || !is_started )
return;
- if (pmath->is_lost_star())
+ if (pmath->is_lost_star() && ++lost_star_try > 2)
{
onStartStopButtonClick();
KMessageBox::error(NULL, i18n("Lost track of the guide star. Try increasing \
the square size and check the mount."));
diff --git a/kstars/ekos/guide/guider.h b/kstars/ekos/guide/guider.h
index 81bbdcd..ebea0c1 100644
--- a/kstars/ekos/guide/guider.h
+++ b/kstars/ekos/guide/guider.h
@@ -62,6 +62,7 @@ private:
bool is_started;
bool is_ready;
bool half_refresh_rate;
+ int lost_star_try;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic