Commit 7f915094 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Check if telescope is connected before accepting sync

parent 6da8bb68
......@@ -1931,7 +1931,7 @@ void Align::setDome(ISD::GDInterface *newDome)
void Align::syncTelescopeInfo()
{
if (currentTelescope == nullptr)
if (currentTelescope == nullptr || currentTelescope->isConnected() == false)
return;
canSync = currentTelescope->canSync();
......
......@@ -955,7 +955,7 @@ void Guide::setTelescopeInfo(double primaryFocalLength, double primaryAperture,
void Guide::syncTelescopeInfo()
{
if (currentTelescope == nullptr)
if (currentTelescope == nullptr || currentTelescope->isConnected() == false)
return;
INumberVectorProperty *nvp = currentTelescope->getBaseDevice()->getNumber("TELESCOPE_INFO");
......
......@@ -201,6 +201,9 @@ void Mount::setTelescope(ISD::GDInterface *newTelescope)
void Mount::syncTelescopeInfo()
{
if (currentTelescope == nullptr || currentTelescope->isConnected() == false)
return;
INumberVectorProperty *nvp = currentTelescope->getBaseDevice()->getNumber("TELESCOPE_INFO");
if (nvp)
......
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