File indexing completed on 2024-03-24 15:18:38

0001 /*
0002     KStars UI tests for meridian flip - special cases
0003 
0004     SPDX-FileCopyrightText: 2020, 2021 Wolfgang Reissenberger <sterne-jaeger@openfuture.de>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #pragma once
0010 
0011 #include "test_ekos_meridianflip_base.h"
0012 
0013 #if defined(HAVE_INDI)
0014 
0015 class TestEkosMeridianFlipSpecials : public TestEkosMeridianFlipBase
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit TestEkosMeridianFlipSpecials(QObject *parent = nullptr);
0021     explicit TestEkosMeridianFlipSpecials(QString guider, QObject *parent = nullptr);
0022     
0023 private slots:
0024 
0025     /** @brief Test a meridian flip where a guiding deviation aborts a capture and subsequently a flip
0026      * is executed. It is expected that capturing is restarted after the flip has been executed successfully.
0027      * */
0028     void testCaptureGuidingDeviationMF();
0029 
0030     /** @brief Test data for @see testSchedulerGuidingDeviationMF() */
0031     void testCaptureGuidingDeviationMF_data();
0032 
0033     /** @brief Test if capturing waits after a MF until the recalibration has succeeded */
0034     void testCaptureGuidingRecalibrationMF();
0035 
0036     /** @brief Test data for @see testCaptureGuidingRecalibrationMF() */
0037     void testCaptureGuidingRecalibrationMF_data();
0038 
0039     /** @brief Test a meridian flip where the dithering counter after the last capture before the flip is already 0.
0040      * Since dithering after the meridian flip is postponed, this checks whether after dithering takes place after
0041      * the first capture after the meridian flip.
0042      * */
0043     void testCaptureDitheringDelayedAfterMF();
0044 
0045     /** @brief Test data for @see testCaptureDitheringDelayedAfterMF() */
0046     void testCaptureDitheringDelayedAfterMF_data();
0047 
0048     /** @brief Test pausing a capture sequence before the meridian flip takes place.
0049      * When capturing is paused, the meridian flip should take place but then nothing more should happen unless
0050      * the pause is finished. As soon as capture continues, all necessary preparations should take place before capturing
0051      * starts again.
0052      * */
0053     void testCaptureAlignGuidingPausedMF();
0054 
0055     /** @brief Test data for @see testCaptureAlignGuidingPausedMF() */
0056     void testCaptureAlignGuidingPausedMF_data();
0057 
0058     /** @brief Test call pausing a capture sequence as soon as a meridian flip has already been planned. */
0059     void testCaptureAlignGuidingPauseMFPlanned();
0060 
0061     /** @brief Test data for @see testCaptureAlignGuidingPauseMFPlanned() */
0062     void testCaptureAlignGuidingPauseMFPlanned_data();
0063 
0064     /** @brief Test if a meridian flip takes place while re-focusing and consequently
0065      * leads to abort the refocusing and refocusing is restarted after a successful meridian flip */
0066     void testAbortRefocusMF();
0067 
0068     /** @brief Test data for @see testCaptureRefocusMF() */
0069     void testAbortRefocusMF_data();
0070 
0071     /** @brief Simple scheduler test case with capturing */
0072     void testSchedulerCaptureMF();
0073 
0074     /** @brief Test data for @see testSchedulerCaptureMF() */
0075     void testSchedulerCaptureMF_data();
0076 
0077     /** @brief Test if a meridian flip within a scheduler job takes place while re-focusing and consequently
0078      * leads to abort the refocusing and the scheduler recovers afterwards */
0079     void testAbortSchedulerRefocusMF();
0080 
0081     /** @brief Test data for @see testAbortSchedulerRefocusMF() */
0082     void testAbortSchedulerRefocusMF_data();
0083 
0084     /** @brief Test the situation where the mount does not change its pier side and the meridian flip is
0085      * repeated after 4 minutes.
0086      * */
0087     void testSimpleRepeatedMF();
0088 
0089     /** @brief Test data for @see testSimpleRepeatedMF() */
0090     void testSimpleRepeatedMF_data();
0091 
0092     /** @brief Test if a re-alignment is aborted during a meridian flip and post flip actions are executed.
0093      */
0094     void testCaptureRealignMF();
0095 
0096     /** @brief Test data for @see testCaptureRealignMF() */
0097     void testCaptureRealignMF_data();
0098 
0099     /**
0100      * @brief Test if failed re-alignment after a meridian flip is retried and handled appropriately
0101      */
0102     void testCapturePostRealignmentFailedHandling();
0103 
0104     /** @brief Test data for @see testCapturePostRealignmentFailedHandling() */
0105     void testCapturePostRealignmentFailedHandling_data();
0106 
0107 };
0108 
0109 #endif // HAVE_INDI