Kstars

capture.h
1 /*
2  SPDX-FileCopyrightText: 2012 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "ui_capture.h"
10 
11 #include "sequencejob.h"
12 #include "ekos/manager/meridianflipstate.h"
13 #include "customproperties.h"
14 #include "ekos/ekos.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 "ui_limits.h"
21 
22 #include <QTimer>
23 #include <QUrl>
24 #include <QDBusInterface>
25 
26 #include <memory>
27 
28 class DSLRInfo;
29 class QProgressIndicator;
30 class QTableWidgetItem;
31 class KDirWatch;
32 class RotatorSettings;
33 
34 /**
35  * @namespace Ekos
36  * @short Ekos is an advanced Astrophotography tool for Linux.
37  * It is based on a modular extensible framework to perform common astrophotography tasks. This includes highly accurate GOTOs using astrometry solver, ability to measure and correct polar alignment errors ,
38  * auto-focus & auto-guide capabilities, and capture of single or stack of images with filter wheel support.\n
39  * Features:
40  * - Control your telescope, CCD (& DSLRs), filter wheel, focuser, guider, adaptive optics unit, and any INDI-compatible auxiliary device from Ekos.
41  * - Extremely accurate GOTOs using astrometry.net solver (both Online and Offline solvers supported).
42  * - Load & Slew: Load a FITS image, slew to solved coordinates, and center the mount on the exact image coordinates in order to get the same desired frame.
43  * - Measure & Correct Polar Alignment errors using astrometry.net solver.
44  * - Auto and manual focus modes using Half-Flux-Radius (HFR) method.
45  * - Automated unattended meridian flip. Ekos performs post meridian flip alignment, calibration, and guiding to resume the capture session.
46  * - Automatic focus between exposures when a user-configurable HFR limit is exceeded.
47  * - Automatic focus between exposures when the temperature has changed a lot since last focus.
48  * - Auto guiding with support for automatic dithering between exposures and support for Adaptive Optics devices in addition to traditional guiders.
49  * - Powerful sequence queue for batch capture of images with optional prefixes, timestamps, filter wheel selection, and much more!
50  * - Export and import sequence queue sets as Ekos Sequence Queue (.esq) files.
51  * - Center the telescope anywhere in a captured FITS image or any FITS with World Coordinate System (WCS) header.
52  * - Automatic flat field capture, just set the desired ADU and let Ekos does the rest!
53  * - Automatic abort and resumption of exposure tasks if guiding errors exceed a user-configurable value.
54  * - Support for dome slaving.
55  * - Complete integration with KStars Observation Planner and SkyMap
56  * - Integrate with all INDI native devices.
57  * - Powerful scripting capabilities via \ref EkosDBusInterface "DBus."
58  *
59  * The primary class is Ekos::Manager. It handles startup and shutdown of local and remote INDI devices, manages and orchesterates the various Ekos modules, and provides advanced DBus
60  * interface to enable unattended scripting.
61  *
62  * @author Jasem Mutlaq
63  * @version 1.9
64  */
65 namespace Ekos
66 {
67 
68 class CaptureDeviceAdaptor;
69 class CaptureModuleState;
70 class CaptureProcess;
71 
72 /**
73  *@class Capture
74  *@short Captures single or sequence of images from a CCD.
75  * The capture class support capturing single or multiple images from a CCD, it provides a
76  * powerful sequence queue with filter selection. Any sequence queue can be saved as
77  * Ekos Sequence Queue (.esq). All image capture operations are saved as Sequence Jobs
78  * that encapsulate all the different options in a capture process. The user may select in
79  * sequence autofocusing by setting limits for HFR, execution time or temperature delta. When the limit
80  * is exceeded, it automatically trigger autofocus operation. The capture process can also be
81  * linked with guide module. If guiding deviations exceed a certain threshold, the capture operation aborts until
82  * the guiding deviation resume to acceptable levels and the capture operation is resumed.
83  *
84  * Controlling the capturing execution is a complex process, that is controlled by
85  * these classes:
86  * - this class, that controll the UI and is the interface for all DBUS functions
87  * - {@see CaptureModuleState} holds all state informations
88  * - {@see CaptureProcess} holds the business logic that controls the process
89  * For ore details about the capturing execution process, please visit {@see CaptureProcess}.
90  *
91  *@author Jasem Mutlaq
92  *@version 1.4
93  */
94 class Capture : public QWidget, public Ui::Capture
95 {
96  Q_OBJECT
97  Q_CLASSINFO("D-Bus Interface", "org.kde.kstars.Ekos.Capture")
98  Q_PROPERTY(Ekos::CaptureState status READ status NOTIFY newStatus)
99  Q_PROPERTY(QString targetName READ getTargetName WRITE setTargetName)
100  Q_PROPERTY(QString observerName READ getObserverName WRITE setObserverName)
101  Q_PROPERTY(QString opticalTrain READ opticalTrain WRITE setOpticalTrain)
102  Q_PROPERTY(QString camera READ camera)
103  Q_PROPERTY(QString filterWheel READ filterWheel)
104  Q_PROPERTY(QString filter READ filter WRITE setFilter)
105  Q_PROPERTY(bool coolerControl READ hasCoolerControl WRITE setCoolerControl)
106  Q_PROPERTY(QStringList logText READ logText NOTIFY newLog)
107 
108  public:
109  typedef enum
110  {
111  NOT_PREVIEW,
112  LOCAL_PREVIEW,
113  REMOTE_PREVIEW
114  } FilenamePreviewType;
115 
116  Capture();
117  ~Capture();
118 
119  /** @defgroup CaptureDBusInterface Ekos DBus Interface - Capture Module
120  * Ekos::Capture interface provides advanced scripting capabilities to capture image sequences.
121  * @{
122  */
123 
124 
125  /** DBUS interface function.
126  * select the CCD device from the available CCD drivers.
127  * @param device The CCD device name
128  */
129  Q_SCRIPTABLE QString camera();
130 
131  /** DBUS interface function.
132  * select the filter device from the available filter drivers. The filter device can be the same as the CCD driver if the filter functionality was embedded within the driver.
133  * @param device The filter device name
134  */
135  Q_SCRIPTABLE QString filterWheel();
136 
137  /** DBUS interface function.
138  * select the filter name from the available filters in case a filter device is active.
139  * @param filter The filter name
140  */
141  Q_SCRIPTABLE bool setFilter(const QString &filter);
142  Q_SCRIPTABLE QString filter();
143 
144  /** DBUS interface function.
145  * Aborts any current jobs and remove all sequence queue jobs.
146  */
147  Q_SCRIPTABLE Q_NOREPLY void clearSequenceQueue();
148 
149  /** DBUS interface function.
150  * Returns the overall sequence queue status. If there are no jobs pending, it returns "Invalid". If all jobs are idle, it returns "Idle". If all jobs are complete, it returns "Complete". If one or more jobs are aborted
151  * it returns "Aborted" unless it was temporarily aborted due to guiding deviations, then it would return "Suspended". If one or more jobs have errors, it returns "Error". If any jobs is under progress, returns "Running".
152  */
154  {
155  return state()->sequenceQueueStatus();
156  }
157 
158  /** DBUS interface function.
159  * Loads the Ekos Sequence Queue file in the Sequence Queue. Jobs are appended to existing jobs.
160  * @param fileURL full URL of the filename
161  * @param targetName override the target in the sequence queue file (necessary for using the target of the scheduler)
162  */
163  Q_SCRIPTABLE bool loadSequenceQueue(const QString &fileURL, QString targetName = "");
164 
165  /** DBUS interface function.
166  * Saves the Sequence Queue to the Ekos Sequence Queue file.
167  * @param fileURL full URL of the filename
168  */
169  Q_SCRIPTABLE bool saveSequenceQueue(const QString &path);
170 
171  /** DBUS interface function.
172  * Enables or disables the maximum guiding deviation and sets its value.
173  * @param enable If true, enable the guiding deviation check, otherwise, disable it.
174  * @param value if enable is true, it sets the maximum guiding deviation in arcsecs. If the value is exceeded, the capture operation is aborted until the value falls below the value threshold.
175  */
176  Q_SCRIPTABLE Q_NOREPLY void setMaximumGuidingDeviation(bool enable, double value);
177 
178  /** DBUS interface function.
179  * Enables or disables the in sequence focus and sets Half-Flux-Radius (HFR) limit.
180  * @param enable If true, enable the in sequence auto focus check, otherwise, disable it.
181  * @param HFR if enable is true, it sets HFR in pixels. After each exposure, the HFR is re-measured and if it exceeds the specified value, an autofocus operation will be commanded.
182  */
183  Q_SCRIPTABLE Q_NOREPLY void setInSequenceFocus(bool enable, double HFR);
184 
185  /** DBUS interface function.
186  * Does the CCD has a cooler control (On/Off) ?
187  */
188  Q_SCRIPTABLE bool hasCoolerControl();
189 
190  /** DBUS interface function.
191  * Set the CCD cooler ON/OFF
192  *
193  */
194  Q_SCRIPTABLE bool setCoolerControl(bool enable);
195 
196  /** DBUS interface function.
197  * @return Returns the percentage of completed captures in all active jobs
198  */
199  Q_SCRIPTABLE double getProgressPercentage()
200  {
201  return state()->progressPercentage();
202  }
203 
204  /** DBUS interface function.
205  * @return Returns the number of jobs in the sequence queue.
206  */
207  Q_SCRIPTABLE int getJobCount()
208  {
209  return state()->allJobs().count();
210  }
211 
212  /** DBUS interface function.
213  * @return Returns the number of pending uncompleted jobs in the sequence queue.
214  */
215  Q_SCRIPTABLE int getPendingJobCount()
216  {
217  return state()->pendingJobCount();
218  }
219 
220  /** DBUS interface function.
221  * @return Returns ID of current active job if any, or -1 if there are no active jobs.
222  */
223  Q_SCRIPTABLE int getActiveJobID()
224  {
225  return state()->activeJobID();
226  }
227 
228  /** DBUS interface function.
229  * @return Returns time left in seconds until active job is estimated to be complete.
230  */
231  Q_SCRIPTABLE int getActiveJobRemainingTime()
232  {
233  return state()->activeJobRemainingTime();
234  }
235 
236  /** DBUS interface function.
237  * @return Returns overall time left in seconds until all jobs are estimated to be complete
238  */
239  Q_SCRIPTABLE int getOverallRemainingTime()
240  {
241  return state()->overallRemainingTime();
242  }
243 
244  /** DBUS interface function.
245  * @param id job number. Job IDs start from 0 to N-1.
246  * @return Returns the job state (Idle, In Progress, Error, Aborted, Complete)
247  */
248  Q_SCRIPTABLE QString getJobState(int id)
249  {
250  return state()->jobState(id);
251  }
252 
253  /** DBUS interface function.
254  * @param id job number. Job IDs start from 0 to N-1.
255  * @return Returns the job filter name.
256  */
257  Q_SCRIPTABLE QString getJobFilterName(int id)
258  {
259  return state()->jobFilterName(id);
260  }
261 
262  /** DBUS interface function.
263  * @param id job number. Job IDs start from 0 to N-1.
264  * @return Returns The number of images completed capture in the job.
265  */
266  Q_SCRIPTABLE int getJobImageProgress(int id)
267  {
268  return state()->jobImageProgress(id);
269  }
270 
271  /** DBUS interface function.
272  * @param id job number. Job IDs start from 0 to N-1.
273  * @return Returns the total number of images to capture in the job.
274  */
275  Q_SCRIPTABLE int getJobImageCount(int id)
276  {
277  return state()->jobImageCount(id);
278  }
279 
280  /** DBUS interface function.
281  * @param id job number. Job IDs start from 0 to N-1.
282  * @return Returns the number of seconds left in an exposure operation.
283  */
284  Q_SCRIPTABLE double getJobExposureProgress(int id)
285  {
286  return state()->jobExposureProgress(id);
287  }
288 
289  /** DBUS interface function.
290  * @param id job number. Job IDs start from 0 to N-1.
291  * @return Returns the total requested exposure duration in the job.
292  */
293  Q_SCRIPTABLE double getJobExposureDuration(int id)
294  {
295  return state()->jobExposureDuration(id);
296  }
297 
298  /** DBUS interface function.
299  * @param id job number. Job IDs start from 0 to N-1.
300  * @return Returns the frame type (light, dark, ...) of the job.
301  */
302  Q_SCRIPTABLE CCDFrameType getJobFrameType(int id)
303  {
304  return state()->jobFrameType(id);
305  }
306 
307  /** DBUS interface function.
308  * Clear in-sequence focus settings. It sets the autofocus HFR to zero so that next autofocus value is remembered for the in-sequence focusing.
309  */
310  Q_SCRIPTABLE Q_NOREPLY void clearAutoFocusHFR();
311 
312  /** DBUS interface function.
313  * Jobs will NOT be checked for progress against the file system and will be always assumed as new jobs.
314  */
315  Q_SCRIPTABLE Q_NOREPLY void ignoreSequenceHistory();
316 
317  /** DBUS interface function.
318  * Set count of already completed frames. This is required when we have identical external jobs
319  * with identical paths, but we need to continue where we left off. For example, if we have 3 identical
320  * jobs, each capturing 5 images. Let's suppose 9 images were captured before. If the count for this signature
321  * is set to 1, then we continue to capture frame #2 even though the number of completed images is already
322  * larger than required count (5). It is mostly used in conjunction with Ekos Scheduler.
323  */
324  Q_SCRIPTABLE Q_NOREPLY void setCapturedFramesMap(const QString &signature, int count)
325  {
326  state()->setCapturedFramesCount(signature, static_cast<ushort>(count));
327  };
328 
329 
330  /** DBUS interface function.
331  * List of logging entries for the capture module.
332  */
333  Q_SCRIPTABLE QStringList logText()
334  {
335  return m_LogText;
336  }
337 
338  /** DBUS interface function.
339  * Single text string holding all log lines for the capture module.
340  */
341  Q_SCRIPTABLE QString getLogText()
342  {
343  return m_LogText.join("\n");
344  }
345 
346  /** DBUS interface function.
347  * Status of the capture module
348  */
349  Q_SCRIPTABLE CaptureState status()
350  {
351  return state()->getCaptureState();
352  }
353  /** @} end of group CaptureDBusInterface */
354 
355 
356  // ////////////////////////////////////////////////////////////////////
357  // Changing the devices used by Capture
358  // ////////////////////////////////////////////////////////////////////
359 
360  /**
361  * @brief Add new Camera
362  * @param device pointer to camera device.
363  * @return True if added successfully, false if duplicate or failed to add.
364  */
365  bool updateCamera();
366 
367  /**
368  * @brief Add new Filter Wheel
369  * @param name device name of the new filter wheel
370  */
371  void setFilterWheel(QString name);
372 
373  /**
374  * @brief Add new Rotator
375  * @param name name of the new rotator
376  */
377  void setRotator(QString name);
378 
379  /**
380  * @brief setDome Set dome device
381  * @param device pointer to dome device
382  * @return true if successfull, false otherewise.
383  */
384  bool setDome(ISD::Dome *device);
385 
386  /**
387  * @brief Generic method for removing any connected device.
388  */
390 
391  /**
392  * @brief registerNewModule Register an Ekos module as it arrives via DBus
393  * and create the appropriate DBus interface to communicate with it.
394  * @param name of module
395  */
396  void registerNewModule(const QString &name);
397 
398  // ////////////////////////////////////////////////////////////////////
399  // Synchronize UI with device parameters
400  // ////////////////////////////////////////////////////////////////////
401 
402  void syncFrameType(const QString &name);
403  void syncCameraInfo();
404 
405  // ////////////////////////////////////////////////////////////////////
406  // Optical Train handling
407  // ////////////////////////////////////////////////////////////////////
408  void setupOpticalTrainManager();
409  void refreshOpticalTrain();
410 
411  QString opticalTrain() const
412  {
413  return opticalTrainCombo->currentText();
414  }
415  void setOpticalTrain(const QString &value)
416  {
417  opticalTrainCombo->setCurrentText(value);
418  }
419 
420  // ////////////////////////////////////////////////////////////////////
421  // Rotator
422  // ////////////////////////////////////////////////////////////////////
423  const QSharedPointer<RotatorSettings> &RotatorControl() const
424  {
425  return m_RotatorControlPanel;
426  }
427 
428  // ////////////////////////////////////////////////////////////////////
429  // Filter Manager and filters
430  // ////////////////////////////////////////////////////////////////////
431  void setupFilterManager();
432 
433  const QSharedPointer<FilterManager> &filterManager() const
434  {
435  return m_FilterManager;
436  }
437 
438  /**
439  * @brief checkFilter Refreshes the filter wheel information in the capture module.
440  */
441  void refreshFilterSettings();
442 
443  /**
444  * @brief shortcut for updating the current filter information for the state machine
445  */
447 
448  // ////////////////////////////////////////////////////////////////////
449  // Read and write access for EkosLive
450  // ////////////////////////////////////////////////////////////////////
451 
452  /**
453  * @brief getSequence Return the JSON representation of the current sequeue queue
454  * @return Reference to JSON array containing sequence queue jobs.
455  */
456  const QJsonArray &getSequence() const
457  {
458  return state()->getSequence();
459  }
460 
461  /**
462  * @brief setSettings Set capture settings
463  * @param settings list of settings
464  */
465  void setPresetSettings(const QJsonObject &settings);
466 
467  /**
468  * @brief getSettings get current capture settings as a JSON Object
469  * @return settings as JSON object
470  */
472 
473  /**
474  * @brief setFileSettings Set File Settings
475  * @param settings as JSON object
476  */
477  void setFileSettings(const QJsonObject &settings);
478  /**
479  * @brief getFileSettings Compile file setting
480  * @return File settings as JSON object
481  */
483 
484  /**
485  * @brief setCalibrationSettings Set Calibration settings
486  * @param settings as JSON object
487  */
488  void setCalibrationSettings(const QJsonObject &settings)
489  {
490  state()->setCalibrationSettings(settings);
491  }
492 
493  /**
494  * @brief getCalibrationSettings Get Calibration settings
495  * @return settings as JSON object
496  */
498  {
499  return state()->calibrationSettings();
500  }
501 
502  /**
503  * @brief setLimitSettings Set limit settings
504  * @param settings as JSON Object
505  */
506  void setLimitSettings(const QJsonObject &settings);
507  /**
508  * @brief getLimitSettings Get Limit Settings
509  * @return settings as JSON Object
510  */
512 
513  /**
514  * @brief setVideoLimits sets the buffer size and max preview fps for live preview
515  * @param maxBufferSize in bytes
516  * @param maxPreviewFPS number of frames per second
517  * @return True if value is updated, false otherwise.
518  */
519  bool setVideoLimits(uint16_t maxBufferSize, uint16_t maxPreviewFPS);
520 
521  // ////////////////////////////////////////////////////////////////////
522  // DSLR handling
523  // ////////////////////////////////////////////////////////////////////
524 
525  /**
526  * @brief addDSLRInfo Save DSLR Info the in the database. If the interactive dialog was open, close it.
527  * @param model Camera name
528  * @param maxW Maximum width in pixels
529  * @param maxH Maximum height in pixels
530  * @param pixelW Pixel horizontal size in microns
531  * @param pixelH Pizel vertical size in microns
532  */
533  void addDSLRInfo(const QString &model, uint32_t maxW, uint32_t maxH, double pixelW, double pixelH);
534 
535  void openExposureCalculatorDialog();
536 
537  QSharedPointer<CaptureDeviceAdaptor> m_captureDeviceAdaptor;
538 
539  public slots:
540  // ////////////////////////////////////////////////////////////////////
541  // Main capturing actions
542  // ////////////////////////////////////////////////////////////////////
543 
544  /** \addtogroup CaptureDBusInterface
545  * @{
546  */
547 
548  /** DBUS interface function.
549  * @brief Start the execution of the Capture::SequenceJob list #jobs.
550  *
551  * Starting the execution of the Capture::SequenceJob list selects the first job
552  * from the list that may be executed and starts to prepare the job (@see prepareJob()).
553  *
554  * Several factors determine, which of the jobs will be selected:
555  * - First, the list is searched to find the first job that is marked as idle or aborted.
556  * - If none is found, it is checked whether ignoring job progress is set. If yes,
557  * all jobs are are reset (@see reset()) and the first one from the list is selected.
558  * If no, the user is asked whether the jobs should be reset. If the user declines,
559  * starting is aborted.
560  */
561  Q_SCRIPTABLE Q_NOREPLY void start();
562 
563  /** DBUS interface function.
564  * Stops currently running jobs:
565  * CAPTURE_IDLE: capture in idle state waiting for further action (e.g. single sequence
566  * is complete, next one starting)
567  * CAPTURE_COMPLETE: all capture sequences are complete
568  * CAPTURE_ABORT: capture aborted either by user interaction or by a technical error
569  * CAPTURE_SUSPEND: capture suspended and waiting to be restarted
570  * @param targetState status of the job after stop
571  */
572  Q_SCRIPTABLE Q_NOREPLY void stop(CaptureState targetState = CAPTURE_IDLE);
573 
574  /** DBUS interface function.
575  * Aborts all jobs and mark current state as ABORTED. It simply calls stop(CAPTURE_ABORTED)
576  */
577  Q_SCRIPTABLE Q_NOREPLY void abort()
578  {
580  }
581 
582  /** DBUS interface function.
583  * Aborts all jobs and mark current state as SUSPENDED. It simply calls stop(CAPTURE_SUSPENDED)
584  * The only difference between SUSPENDED and ABORTED it that capture module can automatically resume a suspended
585  * state on its own without external trigger once the right conditions are met. When whatever reason caused the module
586  * to go into suspended state ceases to exist, the capture module automatically resumes. On the other hand, ABORTED state
587  * must be started via an external programmatic or user trigger (e.g. click the start button again).
588  */
589  Q_SCRIPTABLE Q_NOREPLY void suspend()
590  {
592  }
593  /** DBUS interface function.
594  * @brief pause Pauses the Sequence Queue progress AFTER the current capture is complete.
595  */
596  Q_SCRIPTABLE Q_NOREPLY void pause();
597 
598  /** DBUS interface function.
599  * @brief toggleSequence Toggle sequence state depending on its current state.
600  * 1. If paused, then resume sequence.
601  * 2. If idle or completed, then start sequence.
602  * 3. Otherwise, abort current sequence.
603  */
604  Q_SCRIPTABLE Q_NOREPLY void toggleSequence();
605 
606 
607  /** DBUS interface function.
608  * Toggle video streaming if supported by the device.
609  * @param enabled Set to true to start video streaming, false to stop it if active.
610  */
611  Q_SCRIPTABLE Q_NOREPLY void toggleVideo(bool enabled);
612 
613 
614  /** DBus interface function
615  * @brief restartCamera Restarts the INDI driver associated with a camera. Remote and Local drivers are supported.
616  * @param name Name of camera to restart. If a driver defined multiple cameras, they would be removed and added again
617  * after driver restart.
618  */
619  Q_SCRIPTABLE Q_NOREPLY void restartCamera(const QString &name);
620 
621  /** DBus interface function
622  * @brief Set the name of the target to be captured.
623  */
624  Q_SCRIPTABLE Q_NOREPLY void setTargetName(const QString &newTargetName);
625 
626  Q_SCRIPTABLE QString getTargetName();
627 
628  /** DBus interface function
629  * @brief Set the observer name.
630  */
631  Q_SCRIPTABLE Q_NOREPLY void setObserverName(const QString &value)
632  {
633  state()->setObserverName(value);
634  };
635  Q_SCRIPTABLE QString getObserverName()
636  {
637  return state()->observerName();
638  }
639 
640 
641  /** @}*/
642 
643  /**
644  * @brief process shortcut for the process engine
645  */
647  {
648  return m_captureProcess;
649  }
650 
651  // ////////////////////////////////////////////////////////////////////
652  // Capture actions
653  // ////////////////////////////////////////////////////////////////////
654  /**
655  * @brief captureStarted Change the UI after the capturing process
656  * has been started.
657  */
658  void jobStarting();
659  /**
660  * @brief capturePreview Capture a single preview image
661  */
662  void capturePreview();
663 
664  /**
665  * @brief startFraming Like captureOne but repeating.
666  */
667  void startFraming();
668 
669  /**
670  * @brief generateDarkFlats Generate a list of dark flat jobs from available flat frames.
671  */
672  void generateDarkFlats();
673 
674  /**
675  * @brief updateJobFromUI Update all job attributes from the UI settings.
676  */
677  void updateJobFromUI(SequenceJob *job, FilenamePreviewType filenamePreview = NOT_PREVIEW);
678 
679  /**
680  * @brief addJob Add a new job to the UI. This is used when a job is loaded from a capture sequence file. In
681  * contrast to {@see #createJob()}, the job's attributes are taken from the file and only the UI gehts updated.
682  */
683  void addJob(SequenceJob *job);
684 
685  /**
686  * @brief createJob Create a new job with the settings given in the GUI.
687  * @param jobtype batch, preview, looping or dark flat job.
688  * @param filenamePreview if the job is to generate a preview filename
689  * @return pointer to job created or nullptr otherwise.
690  */
691  SequenceJob *createJob(SequenceJob::SequenceJobType jobtype = SequenceJob::JOBTYPE_BATCH, FilenamePreviewType filenamePreview = NOT_PREVIEW);
692 
693  /**
694  * @brief jobEditFinished Editing of an existing job finished, update its
695  * attributes from the UI settings. The job under edit is taken from the
696  * selection in the job table.
697  * @return true if job updated succeeded.
698  */
699  void editJobFinished();
700 
701  // ////////////////////////////////////////////////////////////////////
702  // public capture settings
703  // ////////////////////////////////////////////////////////////////////
704  /**
705  * @brief seqCount Set required number of images to capture in one sequence job
706  * @param count number of images to capture
707  */
708  void setCount(uint16_t count)
709  {
710  captureCountN->setValue(count);
711  }
712 
713  /**
714  * @brief setDelay Set delay between capturing images within a sequence in seconds
715  * @param delay numbers of seconds to wait before starting the next image.
716  */
717  void setDelay(uint16_t delay)
718  {
719  captureDelayN->setValue(delay);
720  }
721 
722  /**
723  * @brief Slot receiving the update of the current target distance.
724  * @param targetDiff distance to the target in arcseconds.
725  */
726  void updateTargetDistance(double targetDiff);
727 
728  /**
729  * @brief checkCamera Refreshes the CCD information in the capture module.
730  */
731  void refreshCameraSettings();
732 
733  /**
734  * @brief processCCDNumber Process number properties arriving from CCD. Currently, only CCD and Guider frames are processed.
735  * @param nvp pointer to number property.
736  */
737  void processCameraNumber(INDI::Property prop);
738 
739 
740  /**
741  * @brief removeJob Remove a job sequence from the queue
742  * @param index Row index for job to remove, if left as -1 (default), the currently selected row will be removed.
743  * if no row is selected, the last job shall be removed.
744  * @param true if sequence is removed. False otherwise.
745  */
746  bool removeJob(int index = -1);
747 
748  /**
749  * @brief MeridianFlipState Access to the meridian flip state machine
750  */
752  {
753  return state()->getMeridianFlipState();
754  }
755  void setMeridianFlipState(QSharedPointer<MeridianFlipState> newstate);
756 
757  // ////////////////////////////////////////////////////////////////////
758  // UI controls
759  // ////////////////////////////////////////////////////////////////////
760 
761  void removeJobFromQueue();
762 
763  /**
764  * @brief moveJobUp Move the job in the sequence queue one place up or down.
765  */
766  void moveJob(bool up);
767 
768  /**
769  * @brief setTemperature Set the target CCD temperature in the GUI settings.
770  */
771  void setTargetTemperature(double temperature)
772  {
773  cameraTemperatureN->setValue(temperature);
774  }
775 
776  void setForceTemperature(bool enabled)
777  {
778  cameraTemperatureS->setChecked(enabled);
779  }
780 
781  /**
782  * @brief updateTargetName React upon a new capture target name
783  */
784  void newTargetName(const QString &name);
785 
786  /**
787  * @brief showTemperatureRegulation Toggle temperature regulation dialog which sets temperature ramp and threshold
788  */
790 
791  /**
792  * @brief updateStartButtons Update the start and the pause button to new states of capturing
793  * @param start start capturing
794  * @param pause pause capturing
795  */
796  void updateStartButtons(bool start, bool pause = false);
797 
798  // Clear Camera Configuration
799  void clearCameraConfiguration();
800 
801  // ////////////////////////////////////////////////////////////////////
802  // slots handling device and module events
803  // ////////////////////////////////////////////////////////////////////
804 
805  /**
806  * @brief captureStarted Manage the result when capturing has been started
807  */
808  void captureRunning();
809 
810  /**
811  * @brief setGuideDeviation Set the guiding deviation as measured by the guiding module. Abort capture
812  * if deviation exceeds user value. Resume capture if capture was aborted and guiding
813  * deviations are below user value.
814  * @param delta_ra Deviation in RA in arcsecs from the selected guide star.
815  * @param delta_dec Deviation in DEC in arcsecs from the selected guide star.
816  */
817  void setGuideDeviation(double delta_ra, double delta_dec);
818 
819  void setGuideChip(ISD::CameraChip *guideChip);
820 
821  /**
822  * @brief updateCCDTemperature Update CCD temperature in capture module.
823  * @param value Temperature in celcius.
824  */
825  void updateCCDTemperature(double value);
826 
827  // Auto Focus
828  /**
829  * @brief setFocusStatus Forward the new focus state to the capture module state machine
830  */
831  void setFocusStatus(FocusState newstate);
832 
833  /**
834  * @brief updateFocusStatus Handle new focus state
835  */
836  void updateFocusStatus(FocusState newstate);
837 
838  // Adaptive Focus
839  /**
840  * @brief focusAdaptiveComplete Forward the new focus state to the capture module state machine
841  */
842  void focusAdaptiveComplete(bool success)
843  {
844  // directly forward it to the state machine
845  state()->updateAdaptiveFocusState(success);
846  }
847 
848  /**
849  * @brief updateAdaptiveFocusStatus Handle new focus state
850  */
851 
852  void setFocusTemperatureDelta(double focusTemperatureDelta, double absTemperature);
853 
854  /**
855  * @brief setHFR Receive the measured HFR value of the latest frame
856  */
857  void setHFR(double newHFR, int);
858 
859  // Filter
860  void setFilterStatus(FilterState filterState);
861 
862  // Guide
863  void setGuideStatus(GuideState newstate);
864 
865  // Align
866 
867  void setAlignStatus(Ekos::AlignState newstate);
868  void setAlignResults(double solverPA, double ra, double de, double pixscale);
869 
870  // Update Mount module status
871  void setMountStatus(ISD::Mount::Status newState);
872 
873  // ////////////////////////////////////////////////////////////////////
874  // Module logging
875  // ////////////////////////////////////////////////////////////////////
876  void clearLog();
877  void appendLogText(const QString &);
878 
879 
880  private slots:
881 
882  // ////////////////////////////////////////////////////////////////////
883  // UI controls
884  // ////////////////////////////////////////////////////////////////////
885  void checkFrameType(int index);
886  void updateCaptureCountDown(int deltaMillis);
887  void saveFITSDirectory();
888 
889  // Sequence Queue
890  void loadSequenceQueue();
891  void saveSequenceQueue();
892  void saveSequenceQueueAs();
893 
894  // Jobs
895  void resetJobs();
896  bool selectJob(QModelIndex i);
897  void editJob(QModelIndex i);
898  void resetJobEdit(bool cancelled = false);
899 
900  // Flat field
901  void openCalibrationDialog();
902 
903  // Observer
904  void showObserverDialog();
905 
906  // Cooler
907  void setCoolerToggled(bool enabled);
908 
909  // ////////////////////////////////////////////////////////////////////
910  // slots handling device and module events
911  // ////////////////////////////////////////////////////////////////////
912 
913  // Script Manager
914  void handleScriptsManager();
915 
916  void setVideoStreamEnabled(bool enabled);
917 
918  /**
919  * @brief Listen to device property changes (temperature, rotator) that are triggered by
920  * SequenceJob.
921  */
922  void updatePrepareState(CaptureState prepareState);
923 
924  // Rotator
925  void updateRotatorAngle(double value);
926  void setRotatorReversed(bool toggled);
927 
928  /**
929  * @brief setDownloadProgress update the Capture Module and Summary
930  * Screen's estimate of how much time is left in the download
931  */
932  void updateDownloadProgress(double downloadTimeLeft);
933 
934  signals:
935  Q_SCRIPTABLE void newLog(const QString &text);
936  Q_SCRIPTABLE void meridianFlipStarted();
937  Q_SCRIPTABLE void guideAfterMeridianFlip();
938  Q_SCRIPTABLE void newStatus(CaptureState status);
939  Q_SCRIPTABLE void captureComplete(const QVariantMap &metadata);
940 
941  void newFilterStatus(FilterState state);
942 
943  void ready();
944 
945  // communication with other modules
946  void checkFocus(double);
947  void runAutoFocus(bool);
948  void resetFocus();
949  void abortFocus();
950  void adaptiveFocus();
951  void suspendGuiding();
952  void resumeGuiding();
953  void captureTarget(QString targetName);
954  void newImage(SequenceJob *job, const QSharedPointer<FITSData> &data);
955  void newExposureProgress(SequenceJob *job);
956  void newDownloadProgress(double);
957  void sequenceChanged(const QJsonArray &sequence);
958  void settingsUpdated(const QJsonObject &settings);
959  void newLocalPreview(const QString &preview);
960  void dslrInfoRequested(const QString &cameraName);
961  void driverTimedout(const QString &deviceName);
962 
963  // Signals for the Analyze tab.
964  void captureStarting(double exposureSeconds, const QString &filter);
965  void captureAborted(double exposureSeconds);
966 
967  // Filter Manager
968  void filterManagerUpdated(ISD::FilterWheel *device);
969 
970  void trainChanged();
971 
972 
973  private:
974  // ////////////////////////////////////////////////////////////////////
975  // capture process steps
976  // ////////////////////////////////////////////////////////////////////
977  /**
978  * @brief captureImageStarted Image capturing for the active job has started.
979  */
980  void captureImageStarted();
981 
982  /**
983  * @brief jobPreparationStarted Preparation actions for the current active job have beenstarted.
984  */
985  void jobExecutionPreparationStarted();
986 
987  /**
988  * @brief jobPrepared Select the job that is currently in preparation.
989  */
990  void jobPrepared(SequenceJob *job);
991 
992  /**
993  * @brief imageCapturingCompleted Capturing a single frame completed
994  */
995  void imageCapturingCompleted();
996 
997  /**
998  * @brief captureStopped Capturing has stopped
999  */
1000  void captureStopped();
1001 
1002  /**
1003  * @brief processFITSfinished processing new FITS data received from camera finished.
1004  * @param success true iff processing was successful
1005  */
1006  void processingFITSfinished(bool success);
1007 
1008  // Propagate meridian flip state changes to the UI
1009  void updateMeridianFlipStage(MeridianFlipState::MFStage stage);
1010 
1011  // ////////////////////////////////////////////////////////////////////
1012  // Job table handling
1013  // ////////////////////////////////////////////////////////////////////
1014 
1015 
1016  /**
1017  * @brief updateJobTable Update the table row values for the given sequence job. If the job
1018  * is null, all rows will be updated
1019  * @param job as identifier for the row
1020  * @param full if false, then only the status and the counter will be updated.
1021  */
1022  void updateJobTable(SequenceJob *job, bool full = false);
1023 
1024  /**
1025  * @brief updateJobTableCountCell Update the job counter in the job table of a sigle job
1026  */
1027  void updateJobTableCountCell(SequenceJob *job, QTableWidgetItem *countCell);
1028 
1029  // ////////////////////////////////////////////////////////////////////
1030  // helper functions
1031  // ////////////////////////////////////////////////////////////////////
1032  // check if the upload paths are filled correctly
1033  bool checkUploadPaths(FilenamePreviewType filenamePreview);
1034 
1035  // create a new row in the job table and fill it with the given job's values
1036  void createNewJobTableRow(SequenceJob *job);
1037 
1038  // Create a Json job from the current job table row
1039  QJsonObject createJsonJob(SequenceJob *job, int currentRow);
1040 
1041  // shortcut for the module state
1043  {
1044  return m_captureModuleState;
1045  }
1046  // shortcut to device adapter
1048  {
1049  return m_captureDeviceAdaptor;
1050  }
1051  // shortcut for the active job
1052  SequenceJob *activeJob() const
1053  {
1054  return state()->getActiveJob();
1055  }
1056  // Shortcut to the active camera held in the device adaptor
1057  ISD::Camera *activeCamera();
1058 
1059  // Filename preview
1060  void generatePreviewFilename();
1061  QString previewFilename(FilenamePreviewType = LOCAL_PREVIEW);
1062 
1063  void setBusy(bool enable);
1064 
1065  /* Capture */
1066  void createDSLRDialog();
1067 
1068  void resetFrameToZero();
1069 
1070  /**
1071  * @brief Sync refocus options to the GUI settings
1072  */
1073  void syncRefocusOptionsFromGUI();
1074 
1075  /**
1076  * @brief currentScope Retrieve the scope parameters from the optical train.
1077  */
1078  QJsonObject currentScope();
1079 
1080  /**
1081  * @brief currentReducer Retrieve the reducer parameters from the optical train.
1082  */
1083  double currentReducer();
1084 
1085  /**
1086  * @brief currentAperture Determine the current aperture
1087  * @return
1088  */
1089  double currentAperture();
1090 
1091  // ////////////////////////////////////////////////////////////////////
1092  // UI controls
1093  // ////////////////////////////////////////////////////////////////////
1094  /**
1095  * @brief setBinning Set binning
1096  * @param horBin Horizontal binning
1097  * @param verBin Vertical binning
1098  */
1099  void setBinning(int horBin, int verBin)
1100  {
1101  captureBinHN->setValue(horBin);
1102  captureBinVN->setValue(verBin);
1103  }
1104 
1105  /**
1106  * @brief setISO Set index of ISO list.
1107  * @param index index of ISO list.
1108  */
1109  void setISO(int index)
1110  {
1111  captureISOS->setCurrentIndex(index);
1112  }
1113 
1114  // reset = 0 --> Do not reset
1115  // reset = 1 --> Full reset
1116  // reset = 2 --> Only update limits if needed
1117  void updateFrameProperties(int reset = 0);
1118 
1119  /**
1120  * @brief updateCaptureFormats Update encoding and transfer formats
1121  */
1122  void updateCaptureFormats();
1123 
1124  /**
1125  * @brief syncGUIToJob Update UI to job settings
1126  */
1127  void syncGUIToJob(SequenceJob *job);
1128  /**
1129  * @brief syncGUIToState Update UI to general settings from Options
1130  */
1131  void syncGUIToGeneralSettings();
1132 
1133  // DSLR Info
1134  void cullToDSLRLimits();
1135  //void syncDriverToDSLRLimits();
1136 
1137  // selection of a job
1138  void selectedJobChanged(QModelIndex current, QModelIndex previous);
1139 
1140  // Change filter name in INDI
1141  void editFilterName();
1142 
1143  // ////////////////////////////////////////////////////////////////////
1144  // device control
1145  // ////////////////////////////////////////////////////////////////////
1146  // Gain
1147  // This sets and gets the custom properties target gain
1148  // it does not access the ccd gain property
1149  void setGain(double value);
1150  double getGain();
1151 
1152  void setOffset(double value);
1153  double getOffset();
1154 
1155  /**
1156  * @brief processCCDNumber Process number properties arriving from CCD. Currently, only CCD and Guider frames are processed.
1157  * @param nvp pointer to number property.
1158  */
1159  void processCCDNumber(INumberVectorProperty *nvp);
1160 
1161  // ////////////////////////////////////////////////////////////////////
1162  // Attributes
1163  // ////////////////////////////////////////////////////////////////////
1164  double seqExpose { 0 };
1165  int seqTotalCount;
1166  int seqCurrentCount { 0 };
1167 
1168  QPointer<CaptureProcess> m_captureProcess;
1169  QSharedPointer<CaptureModuleState> m_captureModuleState;
1170 
1171  QPointer<QDBusInterface> mountInterface;
1172 
1173  QStringList m_LogText;
1174  bool m_JobUnderEdit { false };
1175 
1176  // Flat field automation
1177  QMap<ScriptTypes, QString> m_Scripts;
1178 
1179  QUrl dirPath;
1180 
1181  std::unique_ptr<CustomProperties> customPropertiesDialog;
1182  std::unique_ptr<DSLRInfo> dslrInfoDialog;
1183 
1184  // Controls
1185  double GainSpinSpecialValue { INVALID_VALUE };
1186  double OffsetSpinSpecialValue { INVALID_VALUE };
1187 
1188  // Dark Processor
1189  std::unique_ptr<Ui::Limits> m_LimitsUI;
1190  QPointer<QDialog> m_LimitsDialog;
1191 
1192  QVariantMap m_Metadata;
1193 
1194  QSharedPointer<FilterManager> m_FilterManager;
1195  QSharedPointer<RotatorSettings> m_RotatorControlPanel;
1196 };
1197 
1198 }
void addJob(SequenceJob *job)
addJob Add a new job to the UI.
Definition: capture.cpp:1528
Q_OBJECTQ_OBJECT
const QJsonArray & getSequence() const
getSequence Return the JSON representation of the current sequeue queue
Definition: capture.h:456
void setTargetTemperature(double temperature)
setTemperature Set the target CCD temperature in the GUI settings.
Definition: capture.h:771
Q_SCRIPTABLE double getProgressPercentage()
DBUS interface function.
Definition: capture.h:199
Q_PROPERTY(...)
Q_SCRIPTABLE int getActiveJobRemainingTime()
DBUS interface function.
Definition: capture.h:231
void updateJobFromUI(SequenceJob *job, FilenamePreviewType filenamePreview=NOT_PREVIEW)
updateJobFromUI Update all job attributes from the UI settings.
Definition: capture.cpp:3255
Q_SCRIPTABLE double getJobExposureDuration(int id)
DBUS interface function.
Definition: capture.h:293
void processCameraNumber(INDI::Property prop)
processCCDNumber Process number properties arriving from CCD.
Definition: capture.cpp:1225
Q_SCRIPTABLE Q_NOREPLY void ignoreSequenceHistory()
DBUS interface function.
Definition: capture.cpp:2094
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:76
void generateDarkFlats()
generateDarkFlats Generate a list of dark flat jobs from available flat frames.
Definition: capture.cpp:3232
Q_SCRIPTABLE Q_NOREPLY void stop(CaptureState targetState=CAPTURE_IDLE)
DBUS interface function.
Definition: capture.cpp:3556
Q_SCRIPTABLE QStringList logText()
DBUS interface function.
Definition: capture.h:333
Q_CLASSINFO(Name, Value)
void setDelay(uint16_t delay)
setDelay Set delay between capturing images within a sequence in seconds
Definition: capture.h:717
Q_SCRIPTABLE Q_NOREPLY void start()
DBUS interface function.
Definition: capture.cpp:3551
Q_SCRIPTABLE int getJobImageProgress(int id)
DBUS interface function.
Definition: capture.h:266
void captureRunning()
captureStarted Manage the result when capturing has been started
Definition: capture.cpp:1456
void updateStartButtons(bool start, bool pause=false)
updateStartButtons Update the start and the pause button to new states of capturing
Definition: capture.cpp:3214
Q_SCRIPTABLE QString getLogText()
DBUS interface function.
Definition: capture.h:341
QSharedPointer< MeridianFlipState > getMeridianFlipState()
MeridianFlipState Access to the meridian flip state machine.
Definition: capture.h:751
void editJobFinished()
jobEditFinished Editing of an existing job finished, update its attributes from the UI settings.
Definition: capture.cpp:1620
void updateCCDTemperature(double value)
updateCCDTemperature Update CCD temperature in capture module.
Definition: capture.cpp:1505
Q_SCRIPTABLE Q_NOREPLY void setCapturedFramesMap(const QString &signature, int count)
DBUS interface function.
Definition: capture.h:324
Q_SCRIPTABLE CCDFrameType getJobFrameType(int id)
DBUS interface function.
Definition: capture.h:302
Q_SCRIPTABLE Q_NOREPLY void setInSequenceFocus(bool enable, double HFR)
DBUS interface function.
Definition: capture.cpp:2325
QPointer< CaptureProcess > process() const
process shortcut for the process engine
Definition: capture.h:646
Q_SCRIPTABLE Q_NOREPLY void toggleVideo(bool enabled)
DBUS interface function.
Definition: capture.cpp:3561
Q_SCRIPTABLE QString getSequenceQueueStatus()
DBUS interface function.
Definition: capture.h:153
void setRotator(QString name)
Add new Rotator.
Definition: capture.cpp:645
Q_SCRIPTABLE bool setFilter(const QString &filter)
DBUS interface function.
Definition: capture.cpp:1288
Q_SCRIPTABLE bool setCoolerControl(bool enable)
DBUS interface function.
Definition: capture.cpp:3541
Q_SCRIPTABLE Q_NOREPLY void setMaximumGuidingDeviation(bool enable, double value)
DBUS interface function.
Definition: capture.cpp:2318
void jobStarting()
captureStarted Change the UI after the capturing process has been started.
Definition: capture.cpp:686
Q_SCRIPTABLE Q_NOREPLY void clearSequenceQueue()
DBUS interface function.
Definition: capture.cpp:2332
bool setDome(ISD::Dome *device)
setDome Set dome device
Definition: capture.cpp:640
The QProgressIndicator class lets an application display a progress indicator to show that a long tas...
void showTemperatureRegulation()
showTemperatureRegulation Toggle temperature regulation dialog which sets temperature ramp and thresh...
Definition: capture.cpp:3157
Q_SCRIPTABLE int getJobImageCount(int id)
DBUS interface function.
Definition: capture.h:275
Q_SCRIPTABLE Q_NOREPLY void restartCamera(const QString &name)
DBus interface function.
Definition: capture.cpp:3595
SequenceJob * createJob(SequenceJob::SequenceJobType jobtype=SequenceJob::JOBTYPE_BATCH, FilenamePreviewType filenamePreview=NOT_PREVIEW)
createJob Create a new job with the settings given in the GUI.
Definition: capture.cpp:1537
QJsonObject getCalibrationSettings()
getCalibrationSettings Get Calibration settings
Definition: capture.h:497
Q_SCRIPTABLE Q_NOREPLY void setObserverName(const QString &value)
DBus interface function.
Definition: capture.h:631
Sequence Job is a container for the details required to capture a series of images.
Definition: sequencejob.h:16
void setCount(uint16_t count)
seqCount Set required number of images to capture in one sequence job
Definition: capture.h:708
void setLimitSettings(const QJsonObject &settings)
setLimitSettings Set limit settings
Definition: capture.cpp:2835
void setFocusTemperatureDelta(double focusTemperatureDelta, double absTemperature)
updateAdaptiveFocusStatus Handle new focus state
Definition: capture.cpp:1837
@ CAPTURE_IDLE
Definition: ekos.h:93
Q_SCRIPTABLE CaptureState status()
DBUS interface function.
Definition: capture.h:349
CaptureState
Capture states.
Definition: ekos.h:91
Q_SCRIPTABLE int getJobCount()
DBUS interface function.
Definition: capture.h:207
Q_SCRIPTABLE Q_NOREPLY void pause()
DBUS interface function.
Definition: capture.cpp:671
Q_SCRIPTABLE Q_NOREPLY void suspend()
DBUS interface function.
Definition: capture.h:589
void removeDevice(const QSharedPointer< ISD::GenericDevice > &device)
Generic method for removing any connected device.
Definition: capture.cpp:3546
QJsonObject getPresetSettings()
getSettings get current capture settings as a JSON Object
Definition: capture.cpp:2214
Q_SCRIPTABLE int getOverallRemainingTime()
DBUS interface function.
Definition: capture.h:239
void setHFR(double newHFR, int)
setHFR Receive the measured HFR value of the latest frame
Definition: capture.cpp:3620
QString join(const QString &separator) const const
void startFraming()
startFraming Like captureOne but repeating.
Definition: capture.cpp:3605
Q_SCRIPTABLE bool hasCoolerControl()
DBUS interface function.
Definition: capture.cpp:3536
@ CAPTURE_ABORTED
Definition: ekos.h:99
void setPresetSettings(const QJsonObject &settings)
setSettings Set capture settings
Definition: capture.cpp:2740
void setFilterWheel(QString name)
Add new Filter Wheel.
Definition: capture.cpp:621
Q_SCRIPTABLE QString getJobFilterName(int id)
DBUS interface function.
Definition: capture.h:257
bool setVideoLimits(uint16_t maxBufferSize, uint16_t maxPreviewFPS)
setVideoLimits sets the buffer size and max preview fps for live preview
Definition: capture.cpp:2469
Captures single or sequence of images from a CCD. The capture class support capturing single or multi...
Definition: capture.h:94
void updateCurrentFilterPosition()
shortcut for updating the current filter information for the state machine
Definition: capture.cpp:1304
Q_SCRIPTABLE Q_NOREPLY void toggleSequence()
DBUS interface function.
Definition: capture.cpp:677
bool updateCamera()
Add new Camera.
Definition: capture.cpp:587
Q_SCRIPTABLE Q_NOREPLY void abort()
DBUS interface function.
Definition: capture.h:577
void newTargetName(const QString &name)
updateTargetName React upon a new capture target name
Definition: capture.cpp:1755
void refreshCameraSettings()
checkCamera Refreshes the CCD information in the capture module.
Definition: capture.cpp:715
QJsonObject getLimitSettings()
getLimitSettings Get Limit Settings
Definition: capture.cpp:2881
Q_SCRIPTABLE int getActiveJobID()
DBUS interface function.
Definition: capture.h:223
Q_SCRIPTABLE Q_NOREPLY void setTargetName(const QString &newTargetName)
DBus interface function.
Definition: capture.cpp:3566
@ CAPTURE_SUSPENDED
Definition: ekos.h:98
Q_SCRIPTABLE Q_NOREPLY void clearAutoFocusHFR()
DBUS interface function.
Definition: capture.cpp:2363
void updateTargetDistance(double targetDiff)
Slot receiving the update of the current target distance.
Definition: capture.cpp:1404
void capturePreview()
capturePreview Capture a single preview image
Definition: capture.cpp:3600
void registerNewModule(const QString &name)
registerNewModule Register an Ekos module as it arrives via DBus and create the appropriate DBus inte...
Definition: capture.cpp:696
void setFileSettings(const QJsonObject &settings)
setFileSettings Set File Settings
Definition: capture.cpp:2803
Q_SCRIPTABLE double getJobExposureProgress(int id)
DBUS interface function.
Definition: capture.h:284
void setFocusStatus(FocusState newstate)
setFocusStatus Forward the new focus state to the capture module state machine
Definition: capture.cpp:1855
void refreshFilterSettings()
checkFilter Refreshes the filter wheel information in the capture module.
Definition: capture.cpp:1312
void setCalibrationSettings(const QJsonObject &settings)
setCalibrationSettings Set Calibration settings
Definition: capture.h:488
bool removeJob(int index=-1)
removeJob Remove a job sequence from the queue
Definition: capture.cpp:1660
void focusAdaptiveComplete(bool success)
focusAdaptiveComplete Forward the new focus state to the capture module state machine
Definition: capture.h:842
void moveJob(bool up)
moveJobUp Move the job in the sequence queue one place up or down.
Definition: capture.cpp:1720
void addDSLRInfo(const QString &model, uint32_t maxW, uint32_t maxH, double pixelW, double pixelH)
addDSLRInfo Save DSLR Info the in the database.
Definition: capture.cpp:2680
AlignState
Definition: ekos.h:144
QJsonObject getFileSettings()
getFileSettings Compile file setting
Definition: capture.cpp:2820
void setGuideDeviation(double delta_ra, double delta_dec)
setGuideDeviation Set the guiding deviation as measured by the guiding module.
Definition: capture.cpp:1846
Q_SCRIPTABLE QString getJobState(int id)
DBUS interface function.
Definition: capture.h:248
void updateFocusStatus(FocusState newstate)
updateFocusStatus Handle new focus state
Definition: capture.cpp:1861
Q_SCRIPTABLE int getPendingJobCount()
DBUS interface function.
Definition: capture.h:215
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Dec 9 2023 04:04:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.