diff --git a/kstars/ekos/guide/externalguide/phd2.cpp b/kstars/ekos/guide/externalguide/phd2.cpp --- a/kstars/ekos/guide/externalguide/phd2.cpp +++ b/kstars/ekos/guide/externalguide/phd2.cpp @@ -391,6 +391,7 @@ { state = LOSTLOCK; abortTimer->start(Options::guideLostStarTimeout() * 1000); + qCDebug(KSTARS_EKOS_GUIDE) << "PHD2: Lost star timeout started (" << Options::guideLostStarTimeout() << " sec)"; } break; @@ -1111,6 +1112,13 @@ sendPHD2Request("set_paused", args); + if (abortTimer->isActive()) + { + // Avoid that the a preceding lost star event leads to an abort while guiding is suspended. + qCDebug(KSTARS_EKOS_GUIDE) << "PHD2: Lost star timeout cancelled."; + abortTimer->stop(); + } + return true; } @@ -1130,6 +1138,12 @@ sendPHD2Request("set_paused", args); + if (state == LOSTLOCK) + { + qCDebug(KSTARS_EKOS_GUIDE) << "PHD2: Lost star timeout restarted."; + abortTimer->start(Options::guideLostStarTimeout() * 1000); + } + return true; }