summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-20 08:38:36 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-20 08:38:36 (GMT)
commit38d88a10185b51e4fd234b6f7741df2ace6c1766 (patch)
tree6dd7e5aa29ca3f2fe68a4fbd8158f2a0a301c08c
parent2c7170381efddc5a20b66253d4d0e4c413d29830 (diff)
Reset state to GUIDE_GUIDING after a successful dithering
-rw-r--r--kstars/ekos/guide/externalguide/linguider.cpp2
-rw-r--r--kstars/ekos/guide/externalguide/phd2.cpp3
-rw-r--r--kstars/ekos/guide/guide.cpp6
-rw-r--r--kstars/ekos/guide/internalguide/internalguider.cpp11
4 files changed, 16 insertions, 6 deletions
diff --git a/kstars/ekos/guide/externalguide/linguider.cpp b/kstars/ekos/guide/externalguide/linguider.cpp
index 23be233..9d7ddea 100644
--- a/kstars/ekos/guide/externalguide/linguider.cpp
+++ b/kstars/ekos/guide/externalguide/linguider.cpp
@@ -272,6 +272,8 @@ void LinGuider::processResponse(LinGuiderCommand command, const QString &reply)
emit newStatus(GUIDE_DITHERING_ERROR);
state = GUIDING;
+ // Back to guiding
+ emit newStatus(GUIDE_GUIDING);
deviationTimer.start();
break;
diff --git a/kstars/ekos/guide/externalguide/phd2.cpp b/kstars/ekos/guide/externalguide/phd2.cpp
index 645323b..02f8770 100644
--- a/kstars/ekos/guide/externalguide/phd2.cpp
+++ b/kstars/ekos/guide/externalguide/phd2.cpp
@@ -338,6 +338,9 @@ void PHD2::processPHD2Event(const QJsonObject &jsonEvent)
{
state = DITHER_SUCCESSFUL;
emit newStatus(Ekos::GUIDE_DITHERING_SUCCESS);
+
+ // Back to guiding
+ emit newStatus(Ekos::GUIDE_GUIDING);
}
}
}
diff --git a/kstars/ekos/guide/guide.cpp b/kstars/ekos/guide/guide.cpp
index 5d77adf..30b292b 100644
--- a/kstars/ekos/guide/guide.cpp
+++ b/kstars/ekos/guide/guide.cpp
@@ -934,7 +934,7 @@ void Guide::stopRapidGuide()
bool Guide::calibrate()
{
- saveSettings();
+ saveSettings();
buildOperationStack(GUIDE_CALIBRATING);
@@ -1059,6 +1059,10 @@ void Guide::startAutoCalibrateGuide()
autoCalibrateGuide = true;
+ // Set status to idle and let the operations change it as they get executed
+ state = GUIDE_IDLE;
+ emit newStatus(state);
+
calibrate();
}
diff --git a/kstars/ekos/guide/internalguide/internalguider.cpp b/kstars/ekos/guide/internalguide/internalguider.cpp
index 4ebbedc..15ac20e 100644
--- a/kstars/ekos/guide/internalguide/internalguider.cpp
+++ b/kstars/ekos/guide/internalguide/internalguider.cpp
@@ -200,16 +200,17 @@ bool InternalGuider::dither(double pixels)
if (fabs(star_pos.x) < 1 && fabs(star_pos.y) < 1)
{
- pmath->setReticleParameters(cur_x, cur_y, ret_angle);
-
- // Back to guiding
- state = GUIDE_GUIDING;
-
+ pmath->setReticleParameters(cur_x, cur_y, ret_angle);
if (Options::guideLogging())
qDebug() << "Guide: Dither complete.";
//emit ditherComplete();
emit newStatus(Ekos::GUIDE_DITHERING_SUCCESS);
+
+ // Back to guiding
+ state = GUIDE_GUIDING;
+ emit newStatus(state);
+
}
else
{