Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/scheduler/scheduler.cpp
Property | Old Value | New Value |
---|---|---|
File Mode | 100644 | 100755 |
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 3475 Lines • ▼ Show 20 Line(s) | 3473 | { | |||
---|---|---|---|---|---|
3476 | switch (currentJob->getStage()) | 3476 | switch (currentJob->getStage()) | ||
3477 | { | 3477 | { | ||
3478 | case SchedulerJob::STAGE_IDLE: | 3478 | case SchedulerJob::STAGE_IDLE: | ||
3479 | if (currentJob->getLightFramesRequired()) | 3479 | if (currentJob->getLightFramesRequired()) | ||
3480 | { | 3480 | { | ||
3481 | if (currentJob->getStepPipeline() & SchedulerJob::USE_TRACK) | 3481 | if (currentJob->getStepPipeline() & SchedulerJob::USE_TRACK) | ||
3482 | startSlew(); | 3482 | startSlew(); | ||
3483 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_FOCUS && autofocusCompleted == false) | 3483 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_FOCUS && autofocusCompleted == false) | ||
3484 | { | ||||
3485 | qCDebug(KSTARS_EKOS_SCHEDULER) << "startFocusing on 3485"; | ||||
3484 | startFocusing(); | 3486 | startFocusing(); | ||
3487 | } | ||||
3485 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_ALIGN) | 3488 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_ALIGN) | ||
3486 | startAstrometry(); | 3489 | startAstrometry(); | ||
3487 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) | 3490 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) | ||
3488 | if (getGuidingStatus() == GUIDE_GUIDING) | 3491 | if (getGuidingStatus() == GUIDE_GUIDING) | ||
3489 | { | 3492 | { | ||
3490 | appendLogText(i18n("Guiding already running, directly start capturing.")); | 3493 | appendLogText(i18n("Guiding already running, directly start capturing.")); | ||
3491 | startCapture(); | 3494 | startCapture(); | ||
3492 | } | 3495 | } | ||
Show All 9 Lines | 3504 | appendLogText( | |||
3502 | i18n("Job '%1' is proceeding directly to capture stage because only calibration frames are pending.", currentJob->getName())); | 3505 | i18n("Job '%1' is proceeding directly to capture stage because only calibration frames are pending.", currentJob->getName())); | ||
3503 | startCapture(); | 3506 | startCapture(); | ||
3504 | } | 3507 | } | ||
3505 | 3508 | | |||
3506 | break; | 3509 | break; | ||
3507 | 3510 | | |||
3508 | case SchedulerJob::STAGE_SLEW_COMPLETE: | 3511 | case SchedulerJob::STAGE_SLEW_COMPLETE: | ||
3509 | if (currentJob->getStepPipeline() & SchedulerJob::USE_FOCUS && autofocusCompleted == false) | 3512 | if (currentJob->getStepPipeline() & SchedulerJob::USE_FOCUS && autofocusCompleted == false) | ||
3513 | { | ||||
3514 | qCDebug(KSTARS_EKOS_SCHEDULER) << "startFocusing on 3514"; | ||||
3510 | startFocusing(); | 3515 | startFocusing(); | ||
3516 | } | ||||
3511 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_ALIGN) | 3517 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_ALIGN) | ||
3512 | startAstrometry(); | 3518 | startAstrometry(); | ||
3513 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) | 3519 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) | ||
3514 | startGuiding(); | 3520 | startGuiding(); | ||
3515 | else | 3521 | else | ||
3516 | startCapture(); | 3522 | startCapture(); | ||
3517 | break; | 3523 | break; | ||
3518 | 3524 | | |||
Show All 10 Lines | 3534 | case SchedulerJob::STAGE_ALIGN_COMPLETE: | |||
3529 | currentJob->setStage(SchedulerJob::STAGE_RESLEWING); | 3535 | currentJob->setStage(SchedulerJob::STAGE_RESLEWING); | ||
3530 | break; | 3536 | break; | ||
3531 | 3537 | | |||
3532 | case SchedulerJob::STAGE_RESLEWING_COMPLETE: | 3538 | case SchedulerJob::STAGE_RESLEWING_COMPLETE: | ||
3533 | // If we have in-sequence-focus in the sequence file then we perform post alignment focusing so that the focus | 3539 | // If we have in-sequence-focus in the sequence file then we perform post alignment focusing so that the focus | ||
3534 | // frame is ready for the capture module in-sequence-focus procedure. | 3540 | // frame is ready for the capture module in-sequence-focus procedure. | ||
3535 | if ((currentJob->getStepPipeline() & SchedulerJob::USE_FOCUS) && currentJob->getInSequenceFocus()) | 3541 | if ((currentJob->getStepPipeline() & SchedulerJob::USE_FOCUS) && currentJob->getInSequenceFocus()) | ||
3536 | // Post alignment re-focusing | 3542 | // Post alignment re-focusing | ||
3543 | { | ||||
3544 | qCDebug(KSTARS_EKOS_SCHEDULER) << "startFocusing on 3544"; | ||||
3537 | startFocusing(); | 3545 | startFocusing(); | ||
3546 | } | ||||
3538 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) | 3547 | else if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) | ||
3539 | startGuiding(); | 3548 | startGuiding(); | ||
3540 | else | 3549 | else | ||
3541 | startCapture(); | 3550 | startCapture(); | ||
3542 | break; | 3551 | break; | ||
3543 | 3552 | | |||
3544 | case SchedulerJob::STAGE_POSTALIGN_FOCUSING_COMPLETE: | 3553 | case SchedulerJob::STAGE_POSTALIGN_FOCUSING_COMPLETE: | ||
3545 | if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) | 3554 | if (currentJob->getStepPipeline() & SchedulerJob::USE_GUIDE) | ||
▲ Show 20 Lines • Show All 3320 Lines • ▼ Show 20 Line(s) | 6874 | { | |||
6866 | appendLogText(i18n("Warning: job '%1' focusing failed.", currentJob->getName())); | 6875 | appendLogText(i18n("Warning: job '%1' focusing failed.", currentJob->getName())); | ||
6867 | 6876 | | |||
6868 | if (focusFailureCount++ < MAX_FAILURE_ATTEMPTS) | 6877 | if (focusFailureCount++ < MAX_FAILURE_ATTEMPTS) | ||
6869 | { | 6878 | { | ||
6870 | appendLogText(i18n("Job '%1' is restarting its focusing procedure.", currentJob->getName())); | 6879 | appendLogText(i18n("Job '%1' is restarting its focusing procedure.", currentJob->getName())); | ||
6871 | // Reset frame to original size. | 6880 | // Reset frame to original size. | ||
6872 | focusInterface->call(QDBus::AutoDetect, "resetFrame"); | 6881 | focusInterface->call(QDBus::AutoDetect, "resetFrame"); | ||
6873 | // Restart focusing | 6882 | // Restart focusing | ||
6883 | qCDebug(KSTARS_EKOS_SCHEDULER) << "startFocusing on 6883"; | ||||
6874 | startFocusing(); | 6884 | startFocusing(); | ||
6875 | } | 6885 | } | ||
6876 | else | 6886 | else | ||
6877 | { | 6887 | { | ||
6878 | appendLogText(i18n("Warning: job '%1' focusing procedure failed, marking aborted.", currentJob->getName())); | 6888 | appendLogText(i18n("Warning: job '%1' focusing procedure failed, marking aborted.", currentJob->getName())); | ||
6879 | currentJob->setState(SchedulerJob::JOB_ABORTED); | 6889 | currentJob->setState(SchedulerJob::JOB_ABORTED); | ||
6880 | 6890 | | |||
6881 | findNextJob(); | 6891 | findNextJob(); | ||
▲ Show 20 Lines • Show All 240 Lines • Show Last 20 Lines |