Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/capture/capture.cpp
Show First 20 Lines • Show All 545 Lines • ▼ Show 20 Line(s) | 527 | { | |||
---|---|---|---|---|---|
546 | if (activeJob->isPreview() == false) | 546 | if (activeJob->isPreview() == false) | ||
547 | { | 547 | { | ||
548 | int index = jobs.indexOf(activeJob); | 548 | int index = jobs.indexOf(activeJob); | ||
549 | QJsonObject oneSequence = m_SequenceArray[index].toObject(); | 549 | QJsonObject oneSequence = m_SequenceArray[index].toObject(); | ||
550 | oneSequence["Status"] = "Aborted"; | 550 | oneSequence["Status"] = "Aborted"; | ||
551 | m_SequenceArray.replace(index, oneSequence); | 551 | m_SequenceArray.replace(index, oneSequence); | ||
552 | emit sequenceChanged(m_SequenceArray); | 552 | emit sequenceChanged(m_SequenceArray); | ||
553 | } | 553 | } | ||
554 | emit newStatus(targetState); | | |||
555 | } | 554 | } | ||
556 | 555 | | |||
557 | // In case of batch job | 556 | // In case of batch job | ||
558 | if (activeJob->isPreview() == false) | 557 | if (activeJob->isPreview() == false) | ||
559 | { | 558 | { | ||
560 | activeJob->disconnect(this); | 559 | activeJob->disconnect(this); | ||
561 | activeJob->reset(); | 560 | activeJob->reset(); | ||
562 | } | 561 | } | ||
Show All 14 Lines | 572 | { | |||
577 | delete (activeJob); | 576 | delete (activeJob); | ||
578 | activeJob = nullptr; | 577 | activeJob = nullptr; | ||
579 | } | 578 | } | ||
580 | } | 579 | } | ||
581 | 580 | | |||
582 | calibrationStage = CAL_NONE; | 581 | calibrationStage = CAL_NONE; | ||
583 | m_State = targetState; | 582 | m_State = targetState; | ||
584 | 583 | | |||
584 | emit newStatus(targetState); | ||||
585 | | ||||
585 | // Turn off any calibration light, IF they were turned on by Capture module | 586 | // Turn off any calibration light, IF they were turned on by Capture module | ||
586 | if (dustCap && dustCapLightEnabled) | 587 | if (dustCap && dustCapLightEnabled) | ||
587 | { | 588 | { | ||
588 | dustCapLightEnabled = false; | 589 | dustCapLightEnabled = false; | ||
589 | dustCap->SetLightEnabled(false); | 590 | dustCap->SetLightEnabled(false); | ||
590 | } | 591 | } | ||
591 | if (lightBox && lightBoxLightEnabled) | 592 | if (lightBox && lightBoxLightEnabled) | ||
592 | { | 593 | { | ||
▲ Show 20 Lines • Show All 3845 Lines • ▼ Show 20 Line(s) | |||||
4438 | 4439 | | |||
4439 | void Capture::setGuideStatus(GuideState state) | 4440 | void Capture::setGuideStatus(GuideState state) | ||
4440 | { | 4441 | { | ||
4441 | switch (state) | 4442 | switch (state) | ||
4442 | { | 4443 | { | ||
4443 | case GUIDE_IDLE: | 4444 | case GUIDE_IDLE: | ||
4444 | case GUIDE_ABORTED: | 4445 | case GUIDE_ABORTED: | ||
4445 | // If Autoguiding was started before and now stopped, let's abort (unless we're doing a meridian flip) | 4446 | // If Autoguiding was started before and now stopped, let's abort (unless we're doing a meridian flip) | ||
4446 | if (guideState == GUIDE_GUIDING && meridianFlipStage == MF_NONE && activeJob && | 4447 | if (guideState == GUIDE_GUIDING && meridianFlipStage == MF_NONE && | ||
4447 | activeJob->getStatus() == SequenceJob::JOB_BUSY) | 4448 | ((activeJob && activeJob->getStatus() == SequenceJob::JOB_BUSY) || | ||
4449 | this->m_State == CAPTURE_SUSPENDED || this->m_State == CAPTURE_PAUSED)) | ||||
4448 | { | 4450 | { | ||
4449 | appendLogText(i18n("Autoguiding stopped. Aborting...")); | 4451 | appendLogText(i18n("Autoguiding stopped. Aborting...")); | ||
4450 | abort(); | 4452 | abort(); | ||
4451 | autoGuideAbortedCapture = true; | | |||
4452 | } | 4453 | } | ||
4453 | break; | 4454 | break; | ||
4454 | 4455 | | |||
4455 | case GUIDE_GUIDING: | 4456 | case GUIDE_GUIDING: | ||
4456 | case GUIDE_CALIBRATION_SUCESS: | 4457 | case GUIDE_CALIBRATION_SUCESS: | ||
4457 | // If capture was aborted due to guide abort | | |||
4458 | // then let's resume capture once we are guiding again. | | |||
4459 | if (autoGuideAbortedCapture && | | |||
4460 | (guideState == GUIDE_ABORTED || guideState == GUIDE_IDLE) && | | |||
4461 | (this->m_State == CAPTURE_ABORTED || this->m_State == CAPTURE_SUSPENDED)) | | |||
4462 | { | | |||
4463 | start(); | | |||
4464 | autoGuideAbortedCapture = false; | | |||
4465 | } | | |||
4466 | | ||||
4467 | autoGuideReady = true; | 4458 | autoGuideReady = true; | ||
4468 | break; | 4459 | break; | ||
4469 | 4460 | | |||
4470 | case GUIDE_CALIBRATION_ERROR: | 4461 | case GUIDE_CALIBRATION_ERROR: | ||
4471 | // TODO try restarting calibration a couple of times before giving up | 4462 | // TODO try restarting calibration a couple of times before giving up | ||
4472 | if (meridianFlipStage == MF_GUIDING) | 4463 | if (meridianFlipStage == MF_GUIDING) | ||
4473 | { | 4464 | { | ||
4474 | if (++retries == 3) | 4465 | if (++retries == 3) | ||
▲ Show 20 Lines • Show All 1528 Lines • Show Last 20 Lines |