Commit fe119676 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Ekos should automatically set ACTIVE_TELESCOPE of CCD device

parent d390e122
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "indi/driverinfo.h" #include "indi/driverinfo.h"
#include "indi/indifilter.h" #include "indi/indifilter.h"
#include "indi/clientmanager.h"
#include "fitsviewer/fitsviewer.h" #include "fitsviewer/fitsviewer.h"
#include "fitsviewer/fitsview.h" #include "fitsviewer/fitsview.h"
...@@ -1264,7 +1265,21 @@ void Capture::setTelescope(ISD::GDInterface *newTelescope) ...@@ -1264,7 +1265,21 @@ void Capture::setTelescope(ISD::GDInterface *newTelescope)
void Capture::syncTelescopeInfo() void Capture::syncTelescopeInfo()
{ {
if (currentTelescope && currentTelescope->isConnected()) if (currentTelescope && currentTelescope->isConnected())
{
parkCheck->setEnabled(currentTelescope->canPark()); parkCheck->setEnabled(currentTelescope->canPark());
ITextVectorProperty *activeDevices = currentCCD->getBaseDevice()->getText("ACTIVE_DEVICES");
if (activeDevices)
{
IText *activeTelescope = IUFindText(activeDevices, "ACTIVE_TELESCOPE");
if (activeTelescope)
{
IUSaveText(activeTelescope, currentTelescope->getDeviceName());
currentCCD->getDriverInfo()->getClientManager()->sendNewText(activeDevices);
}
}
}
} }
void Capture::saveFITSDirectory() void Capture::saveFITSDirectory()
......
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