Commit 86adb722 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Various misc fixes

parent 6a859872
......@@ -650,7 +650,7 @@ bool copyDataFolderFromAppBundleIfNeeded() //The method returns true if the dat
Options::setIndiDriversAreInternal(true);
Options::setAstrometrySolverIsInternal(true);
Options::setAstrometryConfFileIsInternal(true);
Options::setWcsIsInternal(true);
Options::setAstrometryWCSIsInternal(true);
Options::setXplanetIsInternal(true);
Options::setRunStartupWizard( false ); //don't run on startup because we are doing it now.
......
......@@ -3084,7 +3084,7 @@ void Align::setMountStatus(ISD::Telescope::TelescopeStatus newState)
PAHThirdCaptureB->setEnabled(false);
break;
case ISD::Telescope::MOUNT_TRACKING:
default:
if (pi->isAnimated() == false)
{
solveB->setEnabled(true);
......@@ -3094,10 +3094,7 @@ void Align::setMountStatus(ISD::Telescope::TelescopeStatus newState)
PAHFirstCaptureB->setEnabled(true);
PAHSecondCaptureB->setEnabled(true);
PAHThirdCaptureB->setEnabled(true);
break;
default:
break;
break;
}
}
......
......@@ -42,7 +42,7 @@ kcfg_AstrometryConfFileIsInternal->setToolTip(i18n("Internal or External astrome
if(Options::astrometryConfFileIsInternal())
kcfg_AstrometryConfFile->setEnabled(false);
connect(kcfg_wcsIsInternal, SIGNAL(clicked()), this, SLOT(toggleWCSInternal()));
connect(kcfg_AstrometryWCSIsInternal, SIGNAL(clicked()), this, SLOT(toggleWCSInternal()));
kcfg_AstrometryWCSIsInternal->setToolTip(i18n("Internal or External wcsinfo?"));
if(Options::wcsIsInternal())
kcfg_AstrometryWCSInfo->setEnabled(false);
......
......@@ -86,8 +86,9 @@ void OpsAstrometry::slotUpdateScale()
break;
case SCALE_ARCSECPERPIX:
kcfg_AstrometryImageScaleLow->setValue(fov_pixscale);
kcfg_AstrometryImageScaleHigh->setValue(fov_pixscale);
// 10% range
kcfg_AstrometryImageScaleLow->setValue(fov_pixscale*0.9);
kcfg_AstrometryImageScaleHigh->setValue(fov_pixscale*1.1);
break;
default:
......
......@@ -4168,14 +4168,15 @@ void Capture::setMountStatus(ISD::Telescope::TelescopeStatus newState)
startB->setEnabled(false);
break;
case ISD::Telescope::MOUNT_TRACKING:
previewB->setEnabled(true);
if (currentCCD)
liveVideoB->setEnabled(currentCCD->hasVideoStream());
startB->setEnabled(true);
break;
default:
if (pi->isAnimated() == false)
{
previewB->setEnabled(true);
if (currentCCD)
liveVideoB->setEnabled(currentCCD->hasVideoStream());
startB->setEnabled(true);
}
default:
break;
}
}
......
......@@ -1306,6 +1306,9 @@ void EkosManager::processNewProperty(INDI::Property* prop)
if (captureProcess)
captureProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
if (mountProcess)
mountProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
return;
}
......
......@@ -738,8 +738,7 @@ void Focus::start()
Options::setFocusTicks(stepIN->value());
Options::setFocusTolerance(toleranceIN->value());
Options::setFocusExposure(exposureIN->value());
Options::setFocusXBin(activeBin);
Options::setFocusExposure(exposureIN->value());
Options::setFocusMaxTravel(maxTravelIN->value());
Options::setFocusBoxSize(focusBoxSize->value());
Options::setFocusSubFrame(kcfg_subFrame->isChecked());
......@@ -806,6 +805,7 @@ void Focus::stop(bool aborted)
inAutoFocus = false;
inFocusLoop = false;
starSelected= false;
captureInProgress=false;
minimumRequiredHFR = -1;
noStarCount = 0;
HFRFrames.clear();
......@@ -1234,7 +1234,7 @@ void Focus::setCaptureComplete()
}
// Try to average values and find if we have bogus results
if (inFocusLoop == false && starsHFR.count() > 3)
if (inAutoFocus && starsHFR.count() > 3)
{
float mean=0, sum=0, stddev=0, noHFR=0;
......@@ -1253,7 +1253,7 @@ void Focus::setCaptureComplete()
stddev = sqrt(stddev / starsHFR.count());
if (stddev > focusBoxSize->value()/10.0 || noHFR/starsHFR.count() > 0.75)
if (currentHFR == -1 && (stddev > focusBoxSize->value()/10.0 || noHFR/starsHFR.count() > 0.75))
{
appendLogText(i18n("No reliable star is detected. Aborting..."));
abort();
......@@ -2213,8 +2213,11 @@ void Focus::resetButtons()
stopFocusB->setEnabled(false);
startLoopB->setEnabled(true);
captureB->setEnabled(true);
resetFrameB->setEnabled(true);
if (captureInProgress == false)
{
captureB->setEnabled(true);
resetFrameB->setEnabled(true);
}
}
void Focus::updateBoxSize(int value)
......@@ -2226,11 +2229,13 @@ void Focus::updateBoxSize(int value)
if (targetChip == NULL)
return;
int subBinX, subBinY;
targetChip->getBinning(&subBinX, &subBinY);
QRect trackBox = focusView->getTrackingBox();
trackBox.setX(trackBox.x()+(trackBox.width()-value)/2);
trackBox.setY(trackBox.y()+(trackBox.height()-value)/2);
trackBox.setWidth(value);
trackBox.setHeight(value);
QPoint center(trackBox.x()+(trackBox.width()/2), trackBox.y()+(trackBox.height()/2));
trackBox = QRect( center.x()-value/(2*subBinX), center.y()-value/(2*subBinY), value/subBinX, value/subBinY);
focusView->setTrackingBox(trackBox);
}
......@@ -2491,6 +2496,7 @@ void Focus::setAbsoluteFocusTicks()
void Focus::setActiveBinning(int bin)
{
activeBin = bin + 1;
Options::setFocusXBin(activeBin);
}
void Focus::setThreshold(double value)
......@@ -2610,12 +2616,10 @@ void Focus::setMountStatus(ISD::Telescope::TelescopeStatus newState)
startLoopB->setEnabled(false);
break;
case ISD::Telescope::MOUNT_TRACKING:
default:
resetButtons();
break;
default:
break;
}
}
......
......@@ -1080,11 +1080,13 @@ void Guide::setMountStatus(ISD::Telescope::TelescopeStatus newState)
abort();
break;
case ISD::Telescope::MOUNT_TRACKING:
captureB->setEnabled(true);
calibrateB->setEnabled(true);
default:
break;
if (pi->isAnimated() == false)
{
captureB->setEnabled(true);
calibrateB->setEnabled(true);
}
}
}
......
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