7#include "capturedeviceadaptor.h"
9#include "ksmessagebox.h"
11#include "indi/indistd.h"
12#include "ekos_capture_debug.h"
13#include "sequencejobstate.h"
15#include "indi/indicamera.h"
16#include "indi/indidustcap.h"
17#include "indi/indidome.h"
18#include "indi/indilightbox.h"
19#include "indi/indimount.h"
20#include "indi/indirotator.h"
21#include "ekos/auxiliary/rotatorutils.h"
27void CaptureDeviceAdaptor::connectDome(SequenceJobState *state)
32 connect(state, &SequenceJobState::setDomeParked,
this, &CaptureDeviceAdaptor::setDomeParked);
33 connect(
this, &CaptureDeviceAdaptor::domeStatusChanged, state, &SequenceJobState::domeStatusChanged);
36void CaptureDeviceAdaptor::disconnectDome(SequenceJobState *state)
41 disconnect(state, &SequenceJobState::setDomeParked,
this, &CaptureDeviceAdaptor::setDomeParked);
42 disconnect(
this, &CaptureDeviceAdaptor::domeStatusChanged, state, &SequenceJobState::domeStatusChanged);
48 disconnectDevices(currentSequenceJobState.
data());
50 connectRotator(jobState.
data());
51 connectFilterManager(jobState.
data());
52 connectActiveCamera(jobState.
data());
53 connectMount(jobState.
data());
54 connectDome(jobState.
data());
55 connectDustCap(jobState.
data());
56 currentSequenceJobState = jobState;
60void CaptureDeviceAdaptor::setDustCap(
ISD::DustCap *device)
62 disconnectDustCap(currentSequenceJobState.
data());
63 m_ActiveDustCap = device;
64 connectDustCap(currentSequenceJobState.
data());
67void CaptureDeviceAdaptor::disconnectDevices(SequenceJobState *state)
69 disconnectRotator(state);
70 disconnectFilterManager(state);
71 disconnectActiveCamera(state);
72 disconnectMount(state);
73 disconnectDome(state);
74 disconnectDustCap(state);
81void CaptureDeviceAdaptor::connectDustCap(SequenceJobState *state)
83 if (m_ActiveDustCap !=
nullptr)
84 connect(m_ActiveDustCap, &ISD::DustCap::newStatus,
this, &CaptureDeviceAdaptor::dustCapStatusChanged);
89 connect(state, &SequenceJobState::askManualScopeCover,
this, &CaptureDeviceAdaptor::askManualScopeCover);
90 connect(state, &SequenceJobState::askManualScopeOpen,
this, &CaptureDeviceAdaptor::askManualScopeOpen);
91 connect(state, &SequenceJobState::setLightBoxLight,
this, &CaptureDeviceAdaptor::setLightBoxLight);
92 connect(state, &SequenceJobState::parkDustCap,
this, &CaptureDeviceAdaptor::parkDustCap);
94 connect(
this, &CaptureDeviceAdaptor::manualScopeCoverUpdated, state, &SequenceJobState::updateManualScopeCover);
95 connect(
this, &CaptureDeviceAdaptor::lightBoxLight, state, &SequenceJobState::lightBoxLight);
96 connect(
this, &CaptureDeviceAdaptor::dustCapStatusChanged, state, &SequenceJobState::dustCapStateChanged);
99void CaptureDeviceAdaptor::disconnectDustCap(SequenceJobState *state)
101 if (m_ActiveDustCap !=
nullptr)
102 disconnect(m_ActiveDustCap,
nullptr,
this,
nullptr);
104 if (state ==
nullptr)
107 disconnect(state, &SequenceJobState::askManualScopeCover,
this, &CaptureDeviceAdaptor::askManualScopeCover);
108 disconnect(state, &SequenceJobState::askManualScopeOpen,
this, &CaptureDeviceAdaptor::askManualScopeOpen);
109 disconnect(state, &SequenceJobState::setLightBoxLight,
this, &CaptureDeviceAdaptor::setLightBoxLight);
110 disconnect(state, &SequenceJobState::parkDustCap,
this, &CaptureDeviceAdaptor::parkDustCap);
112 disconnect(
this, &CaptureDeviceAdaptor::manualScopeCoverUpdated, state, &SequenceJobState::updateManualScopeCover);
113 disconnect(
this, &CaptureDeviceAdaptor::lightBoxLight, state, &SequenceJobState::lightBoxLight);
114 disconnect(
this, &CaptureDeviceAdaptor::dustCapStatusChanged, state, &SequenceJobState::dustCapStateChanged);
117void CaptureDeviceAdaptor::setMount(
ISD::Mount *device)
119 if (m_ActiveMount == device)
123 if (m_ActiveMount !=
nullptr)
125 disconnect(m_ActiveMount,
nullptr,
this,
nullptr);
126 disconnectMount(currentSequenceJobState.
data());
129 if (device !=
nullptr)
132 connect(device, &ISD::Mount::pierSideChanged,
this, &CaptureDeviceAdaptor::pierSideChanged);
133 connect(device, &ISD::Mount::newParkStatus,
this, &CaptureDeviceAdaptor::scopeParkStatusChanged);
134 connectMount(currentSequenceJobState.
data());
137 emit pierSideChanged(device->pierSide());
138 emit scopeParkStatusChanged(device->parkStatus());
141 m_ActiveMount = device;
144void CaptureDeviceAdaptor::connectMount(SequenceJobState *state)
146 if (state ==
nullptr)
149 connect(state, &SequenceJobState::slewTelescope,
this, &CaptureDeviceAdaptor::slewTelescope);
150 connect(state, &SequenceJobState::setScopeTracking,
this, &CaptureDeviceAdaptor::setScopeTracking);
151 connect(state, &SequenceJobState::readCurrentMountParkState,
this, &CaptureDeviceAdaptor::readCurrentMountParkState);
152 connect(state, &SequenceJobState::setScopeParked,
this, &CaptureDeviceAdaptor::setScopeParked);
154 connect(
this, &CaptureDeviceAdaptor::scopeStatusChanged, state, &SequenceJobState::scopeStatusChanged);
155 connect(
this, &CaptureDeviceAdaptor::scopeParkStatusChanged, state, &SequenceJobState::scopeParkStatusChanged);
158void CaptureDeviceAdaptor::disconnectMount(SequenceJobState *state)
160 if (state ==
nullptr)
163 disconnect(state, &SequenceJobState::slewTelescope,
this, &CaptureDeviceAdaptor::slewTelescope);
164 disconnect(state, &SequenceJobState::setScopeTracking,
this, &CaptureDeviceAdaptor::setScopeTracking);
165 disconnect(state, &SequenceJobState::setScopeParked,
this, &CaptureDeviceAdaptor::setScopeParked);
167 disconnect(
this, &CaptureDeviceAdaptor::scopeStatusChanged, state, &SequenceJobState::scopeStatusChanged);
168 disconnect(
this, &CaptureDeviceAdaptor::scopeParkStatusChanged, state, &SequenceJobState::scopeParkStatusChanged);
171void CaptureDeviceAdaptor::setDome(
ISD::Dome *device)
173 if (m_ActiveDome == device)
177 if (m_ActiveDome !=
nullptr)
179 disconnect(m_ActiveDome,
nullptr,
this,
nullptr);
180 disconnectDome(currentSequenceJobState.
data());
183 if (device !=
nullptr)
185 connect(device, &ISD::Dome::newStatus,
this, &CaptureDeviceAdaptor::domeStatusChanged);
186 connectDome(currentSequenceJobState.
data());
189 m_ActiveDome = device;
192void CaptureDeviceAdaptor::setRotator(
ISD::Rotator *device)
195 if ((m_ActiveRotator == device) && (device !=
nullptr))
199 if (m_ActiveRotator !=
nullptr)
202 disconnectRotator(currentSequenceJobState.
data());
205 m_ActiveRotator = device;
208 if (m_ActiveRotator !=
nullptr)
210 connect(m_ActiveRotator, &ISD::Rotator::newAbsoluteAngle,
this, &CaptureDeviceAdaptor::newRotatorAngle,
212 connect(m_ActiveRotator, &ISD::Rotator::reverseToggled,
this, &CaptureDeviceAdaptor::rotatorReverseToggled,
214 connectRotator(currentSequenceJobState.
data());
216 emit newRotator(device->getDeviceName());
223void CaptureDeviceAdaptor::connectRotator(SequenceJobState *state)
225 if (state ==
nullptr)
228 connect(
this, &CaptureDeviceAdaptor::newRotatorAngle, state, &SequenceJobState::setCurrentRotatorPositionAngle,
230 connect(state, &SequenceJobState::setRotatorAngle,
this, &CaptureDeviceAdaptor::setRotatorAngle);
233void CaptureDeviceAdaptor::disconnectRotator(SequenceJobState *state)
235 if (state ==
nullptr)
238 disconnect(state, &SequenceJobState::setRotatorAngle,
this, &CaptureDeviceAdaptor::setRotatorAngle);
239 disconnect(
this, &CaptureDeviceAdaptor::newRotatorAngle, state, &SequenceJobState::setCurrentRotatorPositionAngle);
242void CaptureDeviceAdaptor::setRotatorAngle(
double rawAngle)
244 if (m_ActiveRotator !=
nullptr && m_ActiveRotator->setAbsoluteAngle(rawAngle))
246 RotatorUtils::Instance()->initTimeFrame(rawAngle);
247 qCInfo(KSTARS_EKOS_CAPTURE) <<
"Setting rotator angle to" << rawAngle <<
"degrees.";
250 qCWarning(KSTARS_EKOS_CAPTURE) <<
"Setting rotator angle to " << rawAngle
251 <<
"failed due to missing or unresponsive rotator.";
254double CaptureDeviceAdaptor::getRotatorAngle()
256 if (m_ActiveRotator !=
nullptr)
257 return m_ActiveRotator->absoluteAngle();
262IPState CaptureDeviceAdaptor::getRotatorAngleState()
264 if (m_ActiveRotator !=
nullptr)
265 return m_ActiveRotator->absoluteAngleState();
270void CaptureDeviceAdaptor::reverseRotator(
bool toggled)
272 if (m_ActiveRotator !=
nullptr)
274 m_ActiveRotator->setReversed(toggled);
275 m_ActiveRotator->setConfig(SAVE_CONFIG);
279void CaptureDeviceAdaptor::readRotatorAngle()
281 if (m_ActiveRotator !=
nullptr)
282 emit newRotatorAngle(m_ActiveRotator->absoluteAngle(), m_ActiveRotator->absoluteAngleState());
287void CaptureDeviceAdaptor::setActiveCamera(
ISD::Camera *device)
289 if (m_ActiveCamera == device)
293 if (m_ActiveCamera !=
nullptr)
296 disconnectActiveCamera(currentSequenceJobState.
data());
301 m_ActiveCamera = device;
304 if (m_ActiveCamera !=
nullptr)
307 connect(m_ActiveCamera, &ISD::Camera::newTemperatureValue,
this,
309 connect(m_ActiveCamera, &ISD::ConcreteDevice::Connected,
this, [
this]()
311 emit CameraConnected(
true);
313 connect(m_ActiveCamera, &ISD::ConcreteDevice::Disconnected,
this, [
this]()
315 emit CameraConnected(
false);
318 if (m_ActiveCamera->hasGuideHead())
319 addGuideHead(device);
321 connectActiveCamera(currentSequenceJobState.
data());
324 emit newCamera(device ==
nullptr ?
"" : device->getDeviceName());
327void CaptureDeviceAdaptor::setFilterWheel(ISD::FilterWheel *device)
329 if (m_ActiveFilterWheel == device)
333 if (m_ActiveFilterWheel !=
nullptr)
337 m_ActiveFilterWheel = device;
340 if (m_ActiveFilterWheel !=
nullptr)
342 connect(m_ActiveFilterWheel, &ISD::ConcreteDevice::Connected,
this, [
this]()
344 emit FilterWheelConnected(
true);
346 connect(m_ActiveFilterWheel, &ISD::ConcreteDevice::Disconnected,
this, [
this]()
348 emit FilterWheelConnected(
false);
353 emit newFilterWheel(device ==
nullptr ?
"" : device->getDeviceName());
356void CaptureDeviceAdaptor::connectActiveCamera(SequenceJobState *state)
358 if (state ==
nullptr)
362 connect(state, &SequenceJobState::setCCDTemperature,
this, &CaptureDeviceAdaptor::setCCDTemperature);
363 connect(state, &SequenceJobState::setCCDBatchMode,
this, &CaptureDeviceAdaptor::enableCCDBatchMode);
364 connect(state, &SequenceJobState::queryHasShutter,
this, &CaptureDeviceAdaptor::queryHasShutter);
367 connect(
this, &CaptureDeviceAdaptor::flatSyncFocusChanged, state, &SequenceJobState::flatSyncFocusChanged);
368 connect(
this, &CaptureDeviceAdaptor::hasShutter, state, &SequenceJobState::hasShutter);
369 connect(
this, &CaptureDeviceAdaptor::newCCDTemperatureValue, state, &SequenceJobState::setCurrentCCDTemperature,
373void CaptureDeviceAdaptor::disconnectActiveCamera(SequenceJobState *state)
375 if (state ==
nullptr)
378 disconnect(state, &SequenceJobState::setCCDTemperature,
this, &CaptureDeviceAdaptor::setCCDTemperature);
379 disconnect(state, &SequenceJobState::setCCDBatchMode,
this, &CaptureDeviceAdaptor::enableCCDBatchMode);
380 disconnect(state, &SequenceJobState::queryHasShutter,
this, &CaptureDeviceAdaptor::queryHasShutter);
382 disconnect(
this, &CaptureDeviceAdaptor::flatSyncFocusChanged, state, &SequenceJobState::flatSyncFocusChanged);
383 disconnect(
this, &CaptureDeviceAdaptor::hasShutter, state, &SequenceJobState::hasShutter);
384 disconnect(
this, &CaptureDeviceAdaptor::newCCDTemperatureValue, state, &SequenceJobState::setCurrentCCDTemperature);
387void CaptureDeviceAdaptor::connectFilterManager(SequenceJobState *state)
389 if (state ==
nullptr)
392 connect(state, &SequenceJobState::changeFilterPosition,
this, &CaptureDeviceAdaptor::setFilterPosition);
393 connect(state, &SequenceJobState::readFilterPosition,
this, &CaptureDeviceAdaptor::updateFilterPosition);
394 connect(
this, &CaptureDeviceAdaptor::filterIdChanged, state, &SequenceJobState::setCurrentFilterID);
396 if (m_FilterManager.
isNull() ==
false)
397 connect(m_FilterManager.
get(), &FilterManager::newStatus, state, &SequenceJobState::setFilterStatus);
400void CaptureDeviceAdaptor::disconnectFilterManager(SequenceJobState *state)
402 if (state ==
nullptr)
405 disconnect(state, &SequenceJobState::readFilterPosition,
this, &CaptureDeviceAdaptor::updateFilterPosition);
406 disconnect(state, &SequenceJobState::changeFilterPosition,
this, &CaptureDeviceAdaptor::setFilterPosition);
407 disconnect(
this, &CaptureDeviceAdaptor::filterIdChanged, state, &SequenceJobState::setCurrentFilterID);
409 if (m_FilterManager.
isNull() ==
false)
410 disconnect(m_FilterManager.
get(), &FilterManager::newStatus, state, &SequenceJobState::setFilterStatus);
413void Ekos::CaptureDeviceAdaptor::updateFilterPosition()
415 if (m_FilterManager.isNull())
417 qCritical(KSTARS_EKOS_CAPTURE) <<
"Filter manager is not initilized yet. Filter wheel missing from train?";
418 emit filterIdChanged(-1);
421 emit filterIdChanged(m_FilterManager->getFilterPosition());
424void Ekos::CaptureDeviceAdaptor::setFilterChangeFailed()
426 qWarning(KSTARS_EKOS_CAPTURE) <<
"Failed to change filter wheel to target position!";
427 emit filterIdChanged(-1);
430void CaptureDeviceAdaptor::readCurrentState(CaptureState state)
435 if (m_ActiveCamera !=
nullptr)
437 double currentTemperature;
438 m_ActiveCamera->getTemperature(¤tTemperature);
439 emit newCCDTemperatureValue(currentTemperature);
450 qWarning(KSTARS_EKOS_CAPTURE) <<
"Reading device state " << state <<
" not implemented!";
455void CaptureDeviceAdaptor::readCurrentMountParkState()
457 if (m_ActiveMount !=
nullptr)
458 emit scopeParkStatusChanged(m_ActiveMount->parkStatus());
461void CaptureDeviceAdaptor::setCCDTemperature(
double temp)
463 if (m_ActiveCamera !=
nullptr)
464 m_ActiveCamera->setTemperature(temp);
467void CaptureDeviceAdaptor::enableCCDBatchMode(
bool enable)
469 if (m_ActiveChip !=
nullptr)
470 m_ActiveChip->setBatchMode(enable);
473void CaptureDeviceAdaptor::abortFastExposure()
475 if (m_ActiveCamera !=
nullptr && m_ActiveChip !=
nullptr && m_ActiveCamera->isFastExposureEnabled())
476 m_ActiveChip->abortExposure();
481 if (getActiveCamera())
485 return propertyMap[
"CCD_GAIN"].value(
"GAIN", -1).toDouble();
486 else if (getActiveCamera()->
getProperty(
"CCD_CONTROLS"))
487 return propertyMap[
"CCD_CONTROLS"].value(
"Gain", -1).toDouble();
492 if (propertyMap.keys().contains(
"CCD_GAIN"))
493 return propertyMap[
"CCD_GAIN"].value(
"GAIN", -1).toDouble();
494 else if(propertyMap.keys().contains(
"CCD_CONTROLS"))
495 return propertyMap[
"CCD_CONTROLS"].value(
"Gain", -1).toDouble();
503double CaptureDeviceAdaptor::cameraGain()
505 double value = INVALID_VALUE;
506 if (getActiveCamera() !=
nullptr)
507 getActiveCamera()->getGain(&value);
514 if (getActiveCamera())
517 return propertyMap[
"CCD_OFFSET"].value(
"OFFSET", -1).toDouble();
518 else if (getActiveCamera()->
getProperty(
"CCD_CONTROLS"))
519 return propertyMap[
"CCD_CONTROLS"].value(
"Offset", -1).toDouble();
524 if (propertyMap.keys().contains(
"CCD_OFFSET"))
525 return propertyMap[
"CCD_OFFSET"].value(
"OFFSET", -1).toDouble();
526 else if(propertyMap.keys().contains(
"CCD_CONTROLS"))
527 return propertyMap[
"CCD_CONTROLS"].value(
"Offset", -1).toDouble();
532double CaptureDeviceAdaptor::cameraOffset()
534 double value = INVALID_VALUE;
535 if (getActiveCamera() !=
nullptr)
536 getActiveCamera()->getOffset(&value);
541double CaptureDeviceAdaptor::cameraTemperature()
543 double value = INVALID_VALUE;
544 if (getActiveCamera() !=
nullptr)
545 getActiveCamera()->getTemperature(&value);
550void CaptureDeviceAdaptor::setFilterPosition(
int targetFilterPosition, FilterManager::FilterPolicy policy)
552 if (m_FilterManager.
isNull() ==
false && m_ActiveFilterWheel !=
nullptr)
553 m_FilterManager->setFilterPosition(targetFilterPosition, policy);
556void CaptureDeviceAdaptor::clearFilterManager()
558 m_FilterManager.
clear();
564 if (m_FilterManager == device)
568 if (m_FilterManager.
isNull() ==
false)
570 disconnect(m_FilterManager.
get(), &FilterManager::ready,
this, &CaptureDeviceAdaptor::updateFilterPosition);
571 disconnectFilterManager(currentSequenceJobState.
data());
574 if (device.
isNull() ==
false)
576 connect(device.
get(), &FilterManager::ready,
this, &CaptureDeviceAdaptor::updateFilterPosition);
577 connectFilterManager(currentSequenceJobState.
data());
580 m_FilterManager = device;
583void CaptureDeviceAdaptor::askManualScopeCover(
QString question,
QString title,
bool light)
586 if (light && m_ManualLightCoveringAsked ==
true)
588 emit manualScopeCoverUpdated(
true,
true,
true);
591 else if (!light && m_ManualDarkCoveringAsked ==
true)
593 emit manualScopeCoverUpdated(
true,
true,
false);
600 emit manualScopeCoverUpdated(
true,
true, light);
602 m_ManualLightCoveringAsked =
false;
603 m_ManualLightOpeningAsked =
false;
604 m_ManualDarkCoveringAsked =
false;
605 m_ManualDarkOpeningAsked =
false;
607 m_ManualLightCoveringAsked =
true;
609 m_ManualDarkCoveringAsked =
true;
616 m_ManualLightCoveringAsked =
false;
618 m_ManualDarkCoveringAsked =
false;
620 emit manualScopeCoverUpdated(
true,
false, light);
624 KSMessageBox::Instance()->warningContinueCancel(question, title, Options::manualCoverTimeout());
628void CaptureDeviceAdaptor::askManualScopeOpen(
bool light)
631 if (light && m_ManualLightOpeningAsked ==
true)
633 emit manualScopeCoverUpdated(
false,
true,
true);
636 else if (!light && m_ManualDarkOpeningAsked ==
true)
638 emit manualScopeCoverUpdated(
false,
true,
false);
645 m_ManualLightCoveringAsked =
false;
646 m_ManualLightOpeningAsked =
false;
647 m_ManualDarkCoveringAsked =
false;
648 m_ManualDarkOpeningAsked =
false;
651 m_ManualLightOpeningAsked =
true;
653 m_ManualDarkOpeningAsked =
true;
655 emit manualScopeCoverUpdated(
false,
true, light);
663 m_ManualLightOpeningAsked =
false;
665 m_ManualDarkOpeningAsked =
false;
666 emit manualScopeCoverUpdated(
false,
false, light);
670 KSMessageBox::Instance()->warningContinueCancel(
i18n(
"Remove cover from the telescope in order to continue."),
671 i18n(
"Telescope Covered"), Options::manualCoverTimeout());
675void CaptureDeviceAdaptor::setLightBoxLight(
bool on)
678 emit lightBoxLight(on);
681void CaptureDeviceAdaptor::parkDustCap(
bool park)
685 if (m_ActiveDustCap->
park())
686 emit dustCapStatusChanged(ISD::DustCap::CAP_PARKING);
688 emit dustCapStatusChanged(ISD::DustCap::CAP_ERROR);
690 else if (m_ActiveDustCap->
unpark())
691 emit dustCapStatusChanged(ISD::DustCap::CAP_UNPARKING);
693 emit dustCapStatusChanged(ISD::DustCap::CAP_ERROR);
696void CaptureDeviceAdaptor::slewTelescope(
SkyPoint &target)
698 if (m_ActiveMount !=
nullptr)
700 m_ActiveMount->Slew(&target);
701 emit scopeStatusChanged(ISD::Mount::MOUNT_SLEWING);
705void CaptureDeviceAdaptor::setScopeTracking(
bool on)
707 if (m_ActiveMount !=
nullptr)
709 m_ActiveMount->setTrackEnabled(on);
710 emit scopeStatusChanged(on ? ISD::Mount::MOUNT_TRACKING : ISD::Mount::MOUNT_IDLE);
714void CaptureDeviceAdaptor::setScopeParked(
bool parked)
716 if (m_ActiveMount !=
nullptr)
720 if (m_ActiveMount->park())
721 emit scopeStatusChanged(ISD::Mount::MOUNT_PARKING);
723 emit scopeStatusChanged(ISD::Mount::MOUNT_ERROR);
727 if (m_ActiveMount->unpark() ==
false)
728 emit scopeStatusChanged(ISD::Mount::MOUNT_ERROR);
733void CaptureDeviceAdaptor::setDomeParked(
bool parked)
735 if (m_ActiveDome !=
nullptr)
739 if (m_ActiveDome->park())
740 emit domeStatusChanged(ISD::Dome::DOME_PARKING);
742 emit domeStatusChanged(ISD::Dome::DOME_ERROR);
746 if (m_ActiveDome->unpark() ==
false)
747 emit domeStatusChanged(ISD::Dome::DOME_ERROR);
753void CaptureDeviceAdaptor::flatSyncFocus(
int targetFilterID)
755 if (getFilterManager()->syncAbsoluteFocusPosition(targetFilterID - 1))
756 emit flatSyncFocusChanged(
true);
758 emit flatSyncFocusChanged(
false);
761void CaptureDeviceAdaptor::queryHasShutter()
763 if (m_ActiveCamera ==
nullptr)
765 emit hasShutter(
false);
768 QStringList shutterfulCCDs = Options::shutterfulCCDs();
769 QStringList shutterlessCCDs = Options::shutterlessCCDs();
770 QString deviceName = m_ActiveCamera->getDeviceName();
772 bool shutterFound = shutterfulCCDs.
contains(deviceName);
774 bool noShutterFound = shutterlessCCDs.
contains(deviceName);
776 if (shutterFound ==
true)
777 emit hasShutter(
true);
778 else if (noShutterFound ==
true)
779 emit hasShutter(
false);
783 QString deviceName = m_ActiveCamera->getDeviceName();
788 QStringList shutterfulCCDs = Options::shutterfulCCDs();
789 shutterfulCCDs.
append(m_ActiveCamera->getDeviceName());
790 Options::setShutterfulCCDs(shutterfulCCDs);
791 emit hasShutter(
true);
797 QStringList shutterlessCCDs = Options::shutterlessCCDs();
798 shutterlessCCDs.
append(m_ActiveCamera->getDeviceName());
799 Options::setShutterlessCCDs(shutterlessCCDs);
800 emit hasShutter(
false);
803 KSMessageBox::Instance()->questionYesNo(
i18n(
"Does %1 have a shutter?", deviceName),
804 i18n(
"Dark Exposure"));
Camera class controls an INDI Camera device.
Class handles control of INDI dome devices.
Handles operation of a remotely controlled dust cover cap.
Q_SCRIPTABLE bool unpark()
UnPark Open dust cap.
Q_SCRIPTABLE bool park()
Park Close dust cap.
Q_SCRIPTABLE bool setLightEnabled(bool enable)
SetLightEnabled Turn on/off light.
device handle controlling Mounts.
void newStatus(ISD::Mount::Status status)
Change in the mount status.
Rotator class handles control of INDI Rotator devices.
The sky coordinates of a point in the sky.
QString i18n(const char *text, const TYPE &arg...)
Ekos is an advanced Astrophotography tool for Linux.
@ CAPTURE_SETTING_ROTATOR
@ CAPTURE_SETTING_TEMPERATURE
QCA_EXPORT QVariant getProperty(const QString &name)
void append(QList< T > &&value)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
bool isNull() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const