[education/kstars] kstars/ekos/align: Clear previousPAError when rotator times out or fails so it doesn't trigger auto-reverse when not warranted.

Jasem Mutlaq <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 6db4c59ef54b0149cad4e2ebad7119f0c10318c4 by Jasem Mutlaq.
Committed on 25/07/2026 at 08:28.
Pushed by mutlaqja into branch 'master'.

Clear previousPAError when rotator times out or fails so it doesn't trigger auto-reverse when not warranted.

M  +3    -0    kstars/ekos/align/align_goto.cpp

https://invent.kde.org/education/kstars/-/commit/6db4c59ef54b0149cad4e2ebad7119f0c10318c4

diff --git a/kstars/ekos/align/align_goto.cpp b/kstars/ekos/align/align_goto.cpp
index 57bafeb2ce..c2210d1209 100644
--- a/kstars/ekos/align/align_goto.cpp
+++ b/kstars/ekos/align/align_goto.cpp
@@ -294,6 +294,7 @@ void Align::updateProperty(INDI::Property prop)
         {
             appendLogText(i18n("Rotator error detected. Aborting alignment."));
             m_RotatorTimer.invalidate();
+            m_PreviousPAError = -1;
             setState(ALIGN_FAILED);
             Q_EMIT newStatus(state);
             solveB->setEnabled(true);
@@ -343,6 +344,7 @@ void Align::updateProperty(INDI::Property prop)
                     if (nvp->s == IPS_OK)
                     {
                         appendLogText(i18n("Rotator failed to arrive at the requested position angle (Deviation %1 arcmin).", diff));
+                        m_PreviousPAError = -1;
                         setState(ALIGN_FAILED);
                         Q_EMIT newStatus(state);
                         solveB->setEnabled(true);
@@ -674,6 +676,7 @@ void Align::checkRotatorTimeout()
         appendLogText(i18n("Rotator timeout after %1 seconds. Aborting alignment.",
                            Options::captureOperationsTimeout()));
         m_RotatorTimer.invalidate();
+        m_PreviousPAError = -1;
         setState(ALIGN_FAILED);
         Q_EMIT newStatus(state);
         solveB->setEnabled(true);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.