Commit 42e39289 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Fixing a problem with setting binning for guide head CCD chip

parent e508b0d3
......@@ -477,7 +477,7 @@ void Capture::captureImage()
}
if (useGuideHead == false && targetChip->setBinning(activeJob->binX, activeJob->binY) == false)
if (targetChip->setBinning(activeJob->binX, activeJob->binY) == false)
{
appendLogText(i18n("Failed to set binning."));
......@@ -500,10 +500,7 @@ void Capture::captureImage()
}
else
{
if (useGuideHead == false)
targetChip->setFrameType(frameTypeCombo->itemText(activeJob->frameType));
targetChip->setFrameType(frameTypeCombo->itemText(activeJob->frameType));
targetChip->setCaptureMode(FITS_NORMAL);
targetChip->setCaptureFilter( (FITSScale) filterCombo->currentIndex());
appendLogText(i18n("Capturing image..."));
......
......@@ -371,8 +371,6 @@ CCDFrameType CCDChip::getFrameType()
bool CCDChip::setBinning(CCDBinType binType)
{
if (type == GUIDE_CCD)
return false;
switch (binType)
{
......@@ -396,11 +394,19 @@ bool CCDChip::setBinning(CCDBinType binType)
CCDBinType CCDChip::getBinning()
{
CCDBinType binType = SINGLE_BIN;
INumberVectorProperty *binProp;
if (type == GUIDE_CCD)
return binType;
switch (type)
{
case PRIMARY_CCD:
binProp = baseDevice->getNumber("CCD_BINNING");
break;
case GUIDE_CCD:
binProp = baseDevice->getNumber("GUIDE_BINNING");
break;
}
INumberVectorProperty *binProp = baseDevice->getNumber("CCD_BINNING");
if (binProp == NULL)
return binType;
......@@ -437,10 +443,20 @@ CCDBinType CCDChip::getBinning()
bool CCDChip::getBinning(int *bin_x, int *bin_y)
{
if (type == GUIDE_CCD)
return false;
INumberVectorProperty *binProp;
switch (type)
{
case PRIMARY_CCD:
binProp = baseDevice->getNumber("CCD_BINNING");
break;
case GUIDE_CCD:
binProp = baseDevice->getNumber("GUIDE_BINNING");
break;
}
INumberVectorProperty *binProp = baseDevice->getNumber("CCD_BINNING");
if (binProp == NULL)
return false;
......@@ -460,10 +476,20 @@ bool CCDChip::getBinning(int *bin_x, int *bin_y)
bool CCDChip::setBinning(int bin_x, int bin_y)
{
if (type == GUIDE_CCD)
return false;
INumberVectorProperty *binProp = baseDevice->getNumber("CCD_BINNING");
INumberVectorProperty *binProp;
switch (type)
{
case PRIMARY_CCD:
binProp = baseDevice->getNumber("CCD_BINNING");
break;
case GUIDE_CCD:
binProp = baseDevice->getNumber("GUIDE_BINNING");
break;
}
if (binProp == NULL)
return false;
......
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