File indexing completed on 2024-04-28 03:43:17
0001 /* 0002 SPDX-FileCopyrightText: 2017 Jasem Mutlaq <mutlaqja@ikarustech.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 0008 #pragma once 0009 0010 #include "ui_rotatorsettings.h" 0011 #include "indi/indimount.h" 0012 #include "qloggingcategory.h" 0013 #include <QDialog> 0014 0015 namespace Ekos 0016 { 0017 class CaptureDeviceAdaptor; 0018 } 0019 0020 class RotatorSettings : public QDialog, public Ui::RotatorDialog 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 0026 explicit RotatorSettings(QWidget *parent); 0027 0028 void initRotator(const QString &train, Ekos::CaptureDeviceAdaptor *CaptureDA, ISD::Rotator *device); 0029 void updateRotator(double RAngle); 0030 void updateGauge(double Angle); 0031 void updateGaugeZeroPos(ISD::Mount::PierSide Pierside); 0032 void updateFlipPolicy(const bool FlipRotationAllowed); 0033 /* remove enforceJobPA 0034 // bool isRotationEnforced() { return enforceJobPA->isChecked(); } 0035 // void setRotationEnforced(bool enabled) { enforceJobPA->setChecked(enabled); } 0036 */ 0037 double getCameraPA() { return CameraPA->value(); } 0038 void setCameraPA(double Angle) { CameraPA->setValue(Angle); } 0039 void setPAOffset(double value) { CameraOffset->setValue(value);} 0040 void refresh(double PAngle); 0041 0042 private: 0043 // Capture adaptor instance to access functions 0044 Ekos::CaptureDeviceAdaptor *m_CaptureDA {nullptr}; 0045 // Rotator Device 0046 ISD::Rotator *m_Rotator = {nullptr}; 0047 void setFlipPolicy(const int index); 0048 void showAlignOptions(); 0049 void activateRotator(double Angle); 0050 void commitRotatorDirection(bool Reverse); 0051 void syncFOV(double PA); 0052 0053 signals: 0054 void newLog(const QString &text); 0055 };