diff --git a/kstars/ekos/capture/capture.h b/kstars/ekos/capture/capture.h --- a/kstars/ekos/capture/capture.h +++ b/kstars/ekos/capture/capture.h @@ -674,7 +674,6 @@ bool useGuideHead { false }; bool autoGuideReady { false}; - bool autoGuideAbortedCapture { false }; QString m_TargetName; QString m_ObserverName; diff --git a/kstars/ekos/capture/capture.cpp b/kstars/ekos/capture/capture.cpp --- a/kstars/ekos/capture/capture.cpp +++ b/kstars/ekos/capture/capture.cpp @@ -551,7 +551,6 @@ m_SequenceArray.replace(index, oneSequence); emit sequenceChanged(m_SequenceArray); } - emit newStatus(targetState); } // In case of batch job @@ -582,6 +581,8 @@ calibrationStage = CAL_NONE; m_State = targetState; + emit newStatus(targetState); + // Turn off any calibration light, IF they were turned on by Capture module if (dustCap && dustCapLightEnabled) { @@ -4443,27 +4444,17 @@ case GUIDE_IDLE: case GUIDE_ABORTED: // If Autoguiding was started before and now stopped, let's abort (unless we're doing a meridian flip) - if (guideState == GUIDE_GUIDING && meridianFlipStage == MF_NONE && activeJob && - activeJob->getStatus() == SequenceJob::JOB_BUSY) + if (guideState == GUIDE_GUIDING && meridianFlipStage == MF_NONE && + ((activeJob && activeJob->getStatus() == SequenceJob::JOB_BUSY) || + this->m_State == CAPTURE_SUSPENDED || this->m_State == CAPTURE_PAUSED)) { appendLogText(i18n("Autoguiding stopped. Aborting...")); abort(); - autoGuideAbortedCapture = true; } break; case GUIDE_GUIDING: case GUIDE_CALIBRATION_SUCESS: - // If capture was aborted due to guide abort - // then let's resume capture once we are guiding again. - if (autoGuideAbortedCapture && - (guideState == GUIDE_ABORTED || guideState == GUIDE_IDLE) && - (this->m_State == CAPTURE_ABORTED || this->m_State == CAPTURE_SUSPENDED)) - { - start(); - autoGuideAbortedCapture = false; - } - autoGuideReady = true; break; 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 @@ -1024,18 +1024,18 @@ //set_connected void PHD2::connectEquipment(bool enable) { + if ((connection == EQUIPMENT_CONNECTED && enable == true) || + (connection == EQUIPMENT_DISCONNECTED && enable == false)) + return; + if (setConnectedRetries++ > MAX_SET_CONNECTED_RETRIES) { setConnectedRetries = 0; connection = EQUIPMENT_DISCONNECTED; emit newStatus(Ekos::GUIDE_DISCONNECTED); return; } - if ((connection == EQUIPMENT_CONNECTED && enable == true) || - (connection == EQUIPMENT_DISCONNECTED && enable == false)) - return; - pixelScale = 0 ; QJsonArray args; diff --git a/kstars/ekos/scheduler/scheduler.cpp b/kstars/ekos/scheduler/scheduler.cpp --- a/kstars/ekos/scheduler/scheduler.cpp +++ b/kstars/ekos/scheduler/scheduler.cpp @@ -6859,7 +6859,7 @@ gStatus == Ekos::GUIDE_CALIBRATION_ERROR || gStatus == GUIDE_DITHERING_ERROR) { - appendLogText(i18n("Job '%1' is capturing, and is restarting its guiding procedure.", currentJob->getName())); + appendLogText(i18n("Job '%1' is capturing, is restarting its guiding procedure (attempt #%2 of %3).", currentJob->getName(), captureFailureCount, MAX_FAILURE_ATTEMPTS)); startGuiding(true); return; }