File indexing completed on 2024-04-28 15:09:53

0001 /*
0002     SPDX-FileCopyrightText: 2023 Jasem Mutlaq <mutlaqja@ikarustech.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "ui_manualpulse.h"
0010 #include "indi/indicommon.h"
0011 #include "skypoint.h"
0012 #include "ekos/guide/guideinterface.h"
0013 
0014 #include <QDialog>
0015 
0016 namespace Ekos
0017 {
0018 /**
0019  * @brief The ManualPulse class generates manual pulses for testing purposes to see how much the mount react to the pulses. This could be used for diagnostics purposes.
0020  */
0021 class ManualPulse : public QDialog, public Ui::ManualPulse
0022 {
0023     Q_OBJECT
0024 public:
0025     ManualPulse(QWidget *parent = nullptr);
0026 
0027     /**
0028      * @brief reset Reset RA & DE offset calculations
0029      */
0030     void reset();
0031 
0032     /**
0033      * @brief setMountCoords calculate new RA/DE offsets
0034      * @param position updated mount position
0035      */
0036     void setMountCoords(const SkyPoint &position);
0037 
0038 signals:
0039     void newSinglePulse(GuideDirection dir, int msecs, CaptureAfterPulses followWithCapture);
0040 
0041 private:
0042     SkyPoint m_LastCoord;
0043 };
0044 }