Commit 77c45c57 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Get pixel size info from CCD chip. Add warnings for DSLRs in case CCD info is incomplete

parent 96e25549
......@@ -612,6 +612,13 @@ void Capture::checkCCD(int ccdNum)
appendLogText(i18n("Using FITS transfer format from DSLR camera. Configure DSLR transfer format in options."));
appendLogText(i18n("Using native transfer format from DSLR camera. Configure DSLR transfer format in options."));
double pixelX=0, pixelY=0;
bool rc = targetChip->getPixelSize(pixelX, pixelY);
if (rc == false || pixelX == 0 || pixelY == 0)
appendLogText(i18n("DSLR CCD Information is incomplete. Please update CCD Information in Image Info section in the INDI Control Panel."));
......@@ -1480,7 +1487,7 @@ void Capture::setExposureProgress(ISD::CCDChip * tChip, double value, IPState st
appendLogText(i18n("Capture failed."));
appendLogText(i18n("Capture failed. Check INDI Control Panel for details."));
if (retries == 3)
......@@ -187,6 +187,37 @@ bool CCDChip::getFrameMinMax(int *minX, int *maxX, int *minY, int *maxY, int *mi
bool CCDChip::getPixelSize(double & x, double & y)
INumberVectorProperty *ccdInfoProp = NULL;
switch (type)
ccdInfoProp = baseDevice->getNumber("CCD_INFO");
ccdInfoProp = baseDevice->getNumber("GUIDER_INFO");
if (ccdInfoProp == NULL)
return false;
INumber *pixelX = IUFindNumber(ccdInfoProp, "CCD_PIXEL_SIZE_X");
INumber *pixelY = IUFindNumber(ccdInfoProp, "CCD_PIXEL_SIZE_Y");
if (pixelX == NULL || pixelY == NULL)
return false;
x = pixelX->value;
y = pixelY->value;
return true;
bool CCDChip::getFrame(int *x, int *y, int *w, int *h)
......@@ -57,6 +57,10 @@ public:
bool getFrame(int *x, int *y, int *w, int *h);
bool getFrameMinMax(int *minX, int *maxX, int *minY, int *maxY, int *minW, int *maxW, int *minH, int *maxH);
bool setFrame(int x, int y, int w, int h);
// Pixel size
bool getPixelSize(double &x, double &y);
//bool getFocusFrame(int *x, int *y, int *w, int *h);
//bool setFocusFrame(int x, int y, int w, int h);
bool resetFrame();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment