void imagesequence::checkCCD(int ccdNum) { INDI_D *idevice = NULL; QString targetCCD = CCDCombo->text(ccdNum); INDIMenu *imenu = ksw->getINDIMenu(); if (!imenu) { KMessageBox::error(this, i18n("INDI Menu has not been initialized properly. Restart KStars.")); return; } idevice = imenu->findDeviceByLabel(targetCCD); if (!idevice) { KMessageBox::error(this, i18n("INDI device %1 no longer exists.").arg(targetCCD)); CCDCombo->removeItem(ccdNum); lastCCD = CCDCombo->currentItem(); if (lastCCD != -1) checkCCD(lastCCD); return; } if (!idevice->isOn()) { KMessageBox::error(this, i18n("%1 is disconnected. Establish a connection to the device using the INDI Control Panel.").arg(targetCCD)); CCDCombo->setCurrentItem(lastCCD); return; } currentCCD = targetCCD; }
void Focus::addCCD(ISD::GDInterface *newCCD) { CCDCaptureCombo->addItem(newCCD->getDeviceName()); CCDs.append(static_cast<ISD::CCD *>(newCCD)); checkCCD(0); CCDCaptureCombo->setCurrentIndex(0); }
int Get2dFlags (WF3Info *wf32d, Hdr *phdr) { extern int status; int missing = 0; /* true if any calibration file is missing */ int nsteps = 0; /* number of calibration steps to perform */ /* Check each reference file that we need. */ if (checkDQI (phdr, wf32d, &missing, &nsteps)) return (status); if (checkCCD (phdr, wf32d, &missing)) return (status); if (checkDark (phdr, wf32d, &missing, &nsteps)) return (status); if (checkFlat (phdr, wf32d, &missing, &nsteps)) return (status); if (checkShad (phdr, wf32d, &missing, &nsteps)) return (status); if (checkPhot (phdr, wf32d, &missing, &nsteps)) return (status); if (missing) { return (status = CAL_FILE_MISSING); } else if (nsteps < 1) { trlwarn ("No calibration switch was set to PERFORM,"); trlwarn (" or all reference files had PEDIGREE = DUMMY."); return (status = NOTHING_TO_DO); } else { return (status); } }