diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/debian/changelog kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/debian/changelog --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/debian/changelog 2023-06-01 18:43:10.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/debian/changelog 2023-06-19 04:07:29.000000000 +0000 @@ -1,8 +1,8 @@ -kstars-bleeding (6:3.6.5+202306011843~ubuntu23.04.1) lunar; urgency=low +kstars-bleeding (6:3.6.5+202306190407~ubuntu23.04.1) lunar; urgency=low * Auto build. - -- Jasem Mutlaq Thu, 01 Jun 2023 18:43:10 +0000 + -- Jasem Mutlaq Mon, 19 Jun 2023 04:07:29 +0000 kstars-bleeding (6:3.6.5) jammy; urgency=medium diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/debian/git-build-recipe.manifest kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/debian/git-build-recipe.manifest --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/debian/git-build-recipe.manifest 2023-06-01 18:43:10.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/debian/git-build-recipe.manifest 2023-06-19 04:07:29.000000000 +0000 @@ -1,3 +1,3 @@ -# git-build-recipe format 0.4 deb-version {debversion}+202306011843 -lp:~mutlaqja/kstars-bleeding/+git/kstars-master git-commit:b93c8aef228f00a32fb0e208ac6bf1ac5a77d95f -nest-part packaging lp:~mutlaqja/kstars-bleeding/+git/kstars-master packaging/linux/debian debian git-commit:b93c8aef228f00a32fb0e208ac6bf1ac5a77d95f +# git-build-recipe format 0.4 deb-version {debversion}+202306190407 +lp:~mutlaqja/kstars-bleeding/+git/kstars-master git-commit:678d3b330187523618a246c20035f90e6e910ad9 +nest-part packaging lp:~mutlaqja/kstars-bleeding/+git/kstars-master packaging/linux/debian debian git-commit:678d3b330187523618a246c20035f90e6e910ad9 diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/doc/config.docbook kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/doc/config.docbook --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/doc/config.docbook 2023-06-01 18:43:03.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/doc/config.docbook 2023-06-19 04:07:23.000000000 +0000 @@ -1460,7 +1460,7 @@ First, pick the coordinate system that matches your mount. For an equatorially mounted instrument, switch to the Equatorial Coordinate mode in the View menu. The option to toggle the coordinate system should read Switch to Horizontal View (Horizontal Coordinates) when the current mode is Equatorial Coordinates. For an altazimuth-mounted instrument or naked-eye viewing, switch to Horizontal Coordinates, so that the option in the View menu reads Switch to Star Globe View (Equatorial Coordinates). This sets the base coordinate system used to render the sky map, and also sets the reference for the orientation of the skymap: zenith or north. - To rotate the sky map freely, you can hold down the Shift key and drag the mouse on the sky map. A temporary overlay will appear showing the direction of north and zenith at the point, and displaying the angle they make with the vertical in a counterclockwise sense. The orientations of zenith and north will update as you rotate the sky map. Letting go of Shift or the mouse button will stop the rotation operation. As you pan the sky map or focus it on different objects, the rotation you set is retained as an offset from the reference direction. The reference direction is north when using Equatorial Coordinates and zenith when using Horizontal Coordinates. As a reminder, the reference direction is solid and brighter in the temporary overlay. For the two common orientations of erect and inverted, the rotation can be set / reset using the ViewSkymap Orientation submenu. Select "North Down" or "Zenith Down" as is applicable to set an orientation of 180 degrees. + To rotate the sky map freely, you can hold down the &Shift; key and drag the mouse on the sky map. A temporary overlay will appear showing the direction of north and zenith at the point, and displaying the angle they make with the vertical in a counterclockwise sense. The orientations of zenith and north will update as you rotate the sky map. Letting go of &Shift; or the mouse button will stop the rotation operation. As you pan the sky map or focus it on different objects, the rotation you set is retained as an offset from the reference direction. The reference direction is north when using Equatorial Coordinates and zenith when using Horizontal Coordinates. As a reminder, the reference direction is solid and brighter in the temporary overlay. For the two common orientations of erect and inverted, the rotation can be set / reset using the ViewSkymap Orientation submenu. Select "North Down" or "Zenith Down" as is applicable to set an orientation of 180 degrees. If you are visually observing through an eyepiece of an instrument, you may need to do some more correction. For the common case of a large Dobsonian telescope (or more generally a Newtonian design mounted on an altazimuth mount), a systematic additional correction is of help. This correction applies because we stand erect while using the telescope irrespective of the angle the telescope tube is making with the ground. So as we move the telescope in altitude, an additional correction depending on the altitude of the object needs to be applied to make the sky map match the view through the eyepiece. This correction is enabled by checking the Erect observer correction checkbox in the ViewSkymap Orientation submenu. This correction only makes sense in Horizontal Coordinate mode and is disabled when using equatorial coordinates. diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/auxiliary/robuststatistics.h kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/auxiliary/robuststatistics.h --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/auxiliary/robuststatistics.h 2023-06-01 18:43:03.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/auxiliary/robuststatistics.h 2023-06-19 04:07:23.000000000 +0000 @@ -364,13 +364,16 @@ [[using gnu : pure]] constexpr double ConvertScaleToWeight(const ScaleCalculation scaleMethod, double scale) { + // If the passed in scale is zero or near zero return a very small weight rather than infinity. + // This fixes the situation where, e.g. there is a single datapoint so scale is zero and + // weighting this datapoint with infinite weight is incorrect (and breaks the LM solver) switch (scaleMethod) { // Variance, biweight midvariance are variances. case SCALE_VARIANCE: [[fallthrough]]; case SCALE_BWMV: - return 1 / scale; + return (scale < 1e-10) ? 1e-10 : 1 / scale; // MAD, Sn, Qn and Pn estimators are all calibrated to estimate the standard deviation of Gaussians. case SCALE_MAD: [[fallthrough]]; @@ -379,7 +382,7 @@ case SCALE_QESTIMATOR: [[fallthrough]]; case SCALE_PESTIMATOR: - return 1 / (scale * scale); + return (scale < 1e-10) ? 1e-10 : 1 / (scale * scale); } return -1; } diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/CMakeLists.txt kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/CMakeLists.txt --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/CMakeLists.txt 2023-06-01 18:43:03.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/CMakeLists.txt 2023-06-19 04:07:23.000000000 +0000 @@ -1169,6 +1169,8 @@ set(kstarslite_SRCS ${kstarslite_SRCS} ${fits_klite_SRCS} ${sep_SRCS} ${hough_SRCS} ${fits2_klite_SRCS} ${kstarslite_libtess_SRC}) IF (NOT ANDROID) + # GSL + find_package(GSL REQUIRED) qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.xml kstars.h KStars) qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.SimClock.xml simclock.h SimClock) qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.FOV.xml fov.h FOV) @@ -1243,6 +1245,7 @@ Qt5::WebSockets ${ZLIB_LIBRARIES} Eigen3::Eigen + GSL::gsl ) if (Qt5Keychain_FOUND) @@ -1313,10 +1316,7 @@ ## Linux + MacOS Lite: Requires INDI Qt5 Client ## Android: Requires INDI Qt5 Client built for Android if (NOT ANDROID) - # GSL - find_package(GSL REQUIRED) - include_directories(${GSL_INCLUDE_DIRS}) - target_link_libraries(KStarsLib ${GSL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} KF5::Notifications) + target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT}) # StellarSolver target_link_libraries(KStarsLib StellarSolver::stellarsolver) endif () diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/data/indidrivers.xml kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/data/indidrivers.xml --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/data/indidrivers.xml 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/data/indidrivers.xml 2023-06-19 04:07:23.000000000 +0000 @@ -29,7 +29,7 @@ indi_lx200_OnStep - 1.18 + 1.19 indi_lx200_OpenAstroTech @@ -75,6 +75,10 @@ indi_lx200autostar 2.1 + + indi_lx200_pegasus_nyx101 + 2.1 + indi_lx200am5 1.0 @@ -910,6 +914,14 @@ + + + indi_oasis_focuser + 1.0 + + + + indi_astrolink4 @@ -1218,6 +1230,14 @@ + + + indi_libcamera_ccd + 1.0 + + + + indi_limesdr_receiver @@ -1257,7 +1277,7 @@ indi_maxdomeii - 1.3 + 1.4 @@ -1317,25 +1337,25 @@ indi_playerone_ccd - 1.4 + 1.7 indi_playerone_single_ccd - 1.4 + 1.7 indi_playerone_single_ccd - 1.4 + 1.7 indi_playerone_single_ccd - 1.4 + 1.7 indi_playerone_wheel - 1.4 + 1.7 @@ -1360,6 +1380,14 @@ + + + indi_rolloffino + 1.0 + + + + indi_rpicam @@ -1478,78 +1506,78 @@ - indi_toupcam_ccd - 1.0 + indi_toupcam_ccd + 2.1 indi_altair_ccd - 1.0 + 2.1 - indi_bressercam_ccd - 1.0 + indi_bressercam_ccd + 2.1 - indi_mallincam_ccd - 1.0 + indi_mallincam_ccd + 2.1 - indi_nncam_ccd - 1.0 + indi_nncam_ccd + 2.1 - indi_ogmacam_ccd - 1.0 + indi_ogmacam_ccd + 2.1 indi_omegonprocam_ccd - 1.0 + 2.1 - indi_starshootg_ccd - 1.0 + indi_starshootg_ccd + 2.1 - indi_tscam_ccd - 1.0 + indi_tscam_ccd + 2.1 - indi_toupcam_wheel - 1.0 + indi_toupcam_wheel + 2.1 indi_altair_wheel - 1.0 + 2.1 - indi_bressercam_wheel - 1.0 + indi_bressercam_wheel + 2.1 - indi_mallincam_wheel - 1.0 + indi_mallincam_wheel + 2.1 - indi_nncam_ccd - 1.0 + indi_nncam_ccd + 2.1 - indi_ogmacam_wheel - 1.0 + indi_ogmacam_wheel + 2.1 indi_omegonprocam_wheel - 1.0 + 2.1 - indi_starshootg_wheel - 1.0 + indi_starshootg_wheel + 2.1 - indi_tscam_wheel - 1.0 + indi_tscam_wheel + 2.1 diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/auxiliary/darkprocessor.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/auxiliary/darkprocessor.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/auxiliary/darkprocessor.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/auxiliary/darkprocessor.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -225,24 +225,23 @@ double duration, uint16_t offsetX, uint16_t offsetY) { info = {trainID, m_TargetChip, targetData, duration, offsetX, offsetY}; - QFuture result = QtConcurrent::run(this, &DarkProcessor::denoiseInternal); - m_Watcher.setFuture(result); -} -/////////////////////////////////////////////////////////////////////////////////////// -/// -/////////////////////////////////////////////////////////////////////////////////////// -bool DarkProcessor::denoiseInternal() -{ - auto train = info.trainID; auto useDefect = false; - // Get the train settings - OpticalTrainSettings::Instance()->setOpticalTrainID(train); + OpticalTrainSettings::Instance()->setOpticalTrainID(trainID); auto settings = OpticalTrainSettings::Instance()->getOneSetting(OpticalTrainSettings::DarkLibrary); if (settings.isValid()) useDefect = settings.toMap().contains("preferDefectsRadio"); + QFuture result = QtConcurrent::run(this, &DarkProcessor::denoiseInternal, useDefect); + m_Watcher.setFuture(result); +} + +/////////////////////////////////////////////////////////////////////////////////////// +/// +/////////////////////////////////////////////////////////////////////////////////////// +bool DarkProcessor::denoiseInternal(bool useDefect) +{ // Check if we have preference for defect map // If yes, check if defect map exists // If not, we check if we have regular dark frame as backup. diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/auxiliary/darkprocessor.h kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/auxiliary/darkprocessor.h --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/auxiliary/darkprocessor.h 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/auxiliary/darkprocessor.h 2023-06-19 04:07:23.000000000 +0000 @@ -47,7 +47,7 @@ private: // Denoise Internal - bool denoiseInternal(); + bool denoiseInternal(bool useDefect); void processDenoiseResult(); //////////////////////////////////////////////////////////////////////////////////////////////// diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/auxiliary/opticaltrainmanager.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/auxiliary/opticaltrainmanager.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/auxiliary/opticaltrainmanager.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/auxiliary/opticaltrainmanager.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -315,9 +315,9 @@ // Check if need secondary train if (cameraComboBox->count() > 2) addOpticalTrain(1, i18n("Secondary")); - // Check if need teritary train + // Check if need tertiary train if (cameraComboBox->count() > 3) - addOpticalTrain(2, i18n("Teritary")); + addOpticalTrain(2, i18n("Tertiary")); } //////////////////////////////////////////////////////////////////////////// diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/capture/capture.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/capture/capture.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/capture/capture.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/capture/capture.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -253,7 +253,7 @@ // Start Guide Deviation Value m_LimitsUI->startGuiderDriftN->setValue(Options::startGuideDeviation()); - connect(m_LimitsUI->startGuiderDriftN, &QDoubleSpinBox::editingFinished, this, [this]() + connect(m_LimitsUI->startGuiderDriftN, QOverload::of(&QDoubleSpinBox::valueChanged), this, [this]() { Options::setStartGuideDeviation(m_LimitsUI->startGuiderDriftN->value()); }); @@ -267,7 +267,7 @@ // Guide Deviation Value m_LimitsUI->limitGuideDeviationN->setValue(Options::guideDeviation()); - connect(m_LimitsUI->limitGuideDeviationN, &QDoubleSpinBox::editingFinished, this, [this]() + connect(m_LimitsUI->limitGuideDeviationN, QOverload::of(&QDoubleSpinBox::valueChanged), this, [this]() { Options::setGuideDeviation(m_LimitsUI->limitGuideDeviationN->value()); }); @@ -283,7 +283,7 @@ // Autofocus HFR Deviation m_LimitsUI->limitFocusHFRN->setValue(Options::hFRDeviation()); - connect(m_LimitsUI->limitFocusHFRN, &QDoubleSpinBox::editingFinished, this, [this]() + connect(m_LimitsUI->limitFocusHFRN, QOverload::of(&QDoubleSpinBox::valueChanged), this, [this]() { Options::setHFRDeviation(m_LimitsUI->limitFocusHFRN->value()); }); @@ -301,7 +301,7 @@ // Autofocus temperature Delta m_LimitsUI->limitFocusDeltaTN->setValue(Options::maxFocusTemperatureDelta()); - connect(m_LimitsUI->limitFocusDeltaTN, &QDoubleSpinBox::editingFinished, this, [this]() + connect(m_LimitsUI->limitFocusDeltaTN, QOverload::of(&QDoubleSpinBox::valueChanged), this, [this]() { Options::setMaxFocusTemperatureDelta(m_LimitsUI->limitFocusDeltaTN->value()); }); @@ -315,7 +315,7 @@ // Refocus Every Value m_LimitsUI->limitRefocusN->setValue(static_cast(Options::refocusEveryN())); - connect(m_LimitsUI->limitRefocusN, &QDoubleSpinBox::editingFinished, this, [this]() + connect(m_LimitsUI->limitRefocusN, QOverload::of(&QSpinBox::valueChanged), this, [this]() { Options::setRefocusEveryN(static_cast(m_LimitsUI->limitRefocusN->value())); }); diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/capture/capturemodulestate.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/capture/capturemodulestate.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/capture/capturemodulestate.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/capture/capturemodulestate.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -37,9 +37,13 @@ break; } - m_CaptureState = value; - getMeridianFlipState()->setCaptureState(m_CaptureState); - emit newStatus(m_CaptureState); + // Only emit status if it changed + if (m_CaptureState != value) + { + m_CaptureState = value; + getMeridianFlipState()->setCaptureState(m_CaptureState); + emit newStatus(m_CaptureState); + } } void CaptureModuleState::setGuideState(GuideState state) diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/capture/sequencejobstate.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/capture/sequencejobstate.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/capture/sequencejobstate.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/capture/sequencejobstate.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -185,34 +185,23 @@ emit prepareComplete(); } break; + // darks and bias frames are handled in the same way case FRAME_DARK: + case FRAME_BIAS: if (!areActionsReady()) return; - // 1. check if the CCD has a shutter - if (checkHasShutter() != IPS_OK) + // 1. check if the scope is covered appropriately + if (checkDarksCoverReady() != IPS_OK) + return; + + // 2. Light source ready, now check if we need to perform mount prepark + if (checkPreMountParkReady() != IPS_OK) + return; + + // 3. Check if we need to perform dome prepark + if (checkPreDomeParkReady() != IPS_OK) return; - switch (flatFieldSource) - { - // All these are manual when it comes to dark frames - case SOURCE_MANUAL: - case SOURCE_DAWN_DUSK: - // For cameras without a shutter, we need to ask the user to cover the telescope - // if the telescope is not already covered. - if (checkManualCoverReady(false) != IPS_OK) - return; - break; - case SOURCE_FLATCAP: - case SOURCE_DARKCAP: - if (checkDustCapReady(FRAME_DARK) != IPS_OK) - return; - break; - - case SOURCE_WALL: - if (checkWallPositionReady(FRAME_DARK) != IPS_OK) - return; - break; - } // avoid doubled events if (m_PreparationState == PREP_BUSY) @@ -221,17 +210,6 @@ emit prepareComplete(); } break; - case FRAME_BIAS: - if (areActionsReady()) - { - // avoid doubled events - if (m_PreparationState == PREP_BUSY) - { - m_PreparationState = PREP_COMPLETED; - emit prepareComplete(); - } - } - break; default: // all other cases not refactored yet, preparation immediately completed emit prepareComplete(); @@ -371,6 +349,37 @@ break; } return result; +} + +IPState SequenceJobState::checkDarksCoverReady() +{ + IPState result = IPS_OK; + + // 1. check if the CCD has a shutter + result = checkHasShutter(); + if (result != IPS_OK) + return result; + + // 2. check if the selected cover is ready for darks + switch (flatFieldSource) + { + // All these are manual when it comes to dark frames + case SOURCE_MANUAL: + case SOURCE_DAWN_DUSK: + // For cameras without a shutter, we need to ask the user to cover the telescope + // if the telescope is not already covered. + result = checkManualCoverReady(false); + break; + case SOURCE_FLATCAP: + case SOURCE_DARKCAP: + result = checkDustCapReady(FRAME_DARK); + break; + + case SOURCE_WALL: + result = checkWallPositionReady(FRAME_DARK); + break; + } + return result; } IPState SequenceJobState::checkManualCoverReady(bool light) diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/capture/sequencejobstate.h kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/capture/sequencejobstate.h --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/capture/sequencejobstate.h 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/capture/sequencejobstate.h 2023-06-19 04:07:23.000000000 +0000 @@ -416,6 +416,13 @@ IPState checkFlatsLightCoverReady(); /** + * @brief Check if the selected dark covers is ready. + * @return IPS_OK if cover closed, IPS_BUSY if not and IPS_ALERT if the + * process should be aborted. + */ + IPState checkDarksCoverReady(); + + /** * @brief Ask the user to place a flat screen onto the telescope * @return IPS_OK if cover closed, IPS_BUSY if not and IPS_ALERT if the * process should be aborted. diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/ekoslive/ekosliveclient.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/ekoslive/ekosliveclient.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/ekoslive/ekosliveclient.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/ekoslive/ekosliveclient.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -10,6 +10,7 @@ #include "ekos/manager.h" #include "kspaths.h" +#include "ekos_debug.h" #include "QProgressIndicator.h" #include @@ -126,7 +127,11 @@ } } } - + } + else + { + if (autoStartCheck->isChecked()) + qCWarning(KSTARS_EKOS) << "Failed to automatically connect due to missing EkosLive credentials:" << job->errorString(); } job->deleteLater(); }); diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/ekoslive/message.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/ekoslive/message.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/ekoslive/message.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/ekoslive/message.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -93,7 +93,7 @@ void Message::onTextReceived(const QString &message) { auto node = qobject_cast(sender()); - if (!node) + if (!node || message.isEmpty()) return; qCInfo(KSTARS_EKOS) << "Websocket Message" << message; diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/ekoslive/node.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/ekoslive/node.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/ekoslive/node.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/ekoslive/node.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -65,7 +65,7 @@ void Node::onConnected() { - qCInfo(KSTARS_EKOS) << "Connected to" << m_Name << "Websocket server at" << m_URL.toDisplayString(); + //qCInfo(KSTARS_EKOS) << "Connected to" << m_Name << "Websocket server at" << m_URL.toDisplayString(); m_isConnected = true; m_ReconnectTries = 0; diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/ekoslive/nodemanager.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/ekoslive/nodemanager.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/ekoslive/nodemanager.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/ekoslive/nodemanager.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -168,6 +168,10 @@ return; } + // Cloud only supported for plan_id = 1 + if (m_AuthResponse["plan_id"].toString("2") == "2") + m_Nodes.remove("cloud"); + for (auto &node : m_Nodes) { node->setAuthResponse(m_AuthResponse); diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/focus/focusalgorithms.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/focus/focusalgorithms.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/focus/focusalgorithms.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/focus/focusalgorithms.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -769,11 +769,20 @@ foundFit = params.curveFitting->findMinMax(position, 0, params.maxPositionAllowed, &minPos, &minVal, static_cast(params.curveFit), params.optimisationDirection); - if (!foundFit) - qCDebug(KSTARS_EKOS_FOCUS) << QString("linearWalk failed to fit curve"); - if (numSteps >= params.numSteps) - return finishFirstPass(static_cast(round(minPos)), minVal); + { + // linearWalk has now completed either successfully (foundFit=true) or not + if (foundFit) + return finishFirstPass(static_cast(round(minPos)), minVal); + else + { + done = true; + doneString = i18n("Failed to fit curve to data."); + qCDebug(KSTARS_EKOS_FOCUS) << QString("LinearWalk: %1").arg(doneString); + debugLog(); + return -1; + } + } } } diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/focus/focus.ui kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/focus/focus.ui --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/focus/focus.ui 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/focus/focus.ui 2023-06-19 04:07:23.000000000 +0000 @@ -1050,7 +1050,7 @@ - <html><head/><body><p>Subframe around the focus star during the autofocus procedure.</p></body></html> + <html><head/><body><p>Select Sub Frame to make focus to use a single star (note: Full Field uses multiple stars). In this mode the Auto Select Star checkbox becomes active to allow either Ekos to select a star (when checked) or to allow the user to manually select the star in FitsViewer (when unchecked).</p></body></html> Sub Frame @@ -1066,7 +1066,7 @@ - <html><head/><body><p>Measure average HFR from all stars combined in a full frame. This method defaults to the Centroid detection, but can use SEP detection too. Its performance decreases as the number of stars increases.</p></body></html> + <html><head/><body><p>Select Full Field to allow focus to use multiple stars (note: Sub Frame uses a single star). In this mode Ekos will automatically select multiple stars during Autofocus and, for example, average the HFR of all stars detected to perform focus. </p></body></html> Full Field @@ -1170,7 +1170,7 @@ - Automatically select the best focus star from the image + <html><head/><body><p>This option is only active when Sub Frame is selected. Check to allow Ekos to select a single star for focus; uncheck to allow the user to select the star to use in FitsViewer.</p></body></html> Auto Select Star @@ -3876,7 +3876,7 @@ - + diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/guide/guide.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/guide/guide.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/ekos/guide/guide.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/ekos/guide/guide.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -328,7 +328,7 @@ if (m_Camera) { - connect(m_Camera, &ISD::ConcreteDevice::Connected, this, [this]() + connect(m_Camera, &ISD::Camera::Connected, this, [this]() { controlGroupBox->setEnabled(true); }); @@ -505,7 +505,7 @@ return; } - connect(m_Camera, &ISD::Camera::updateProperty, this, &Ekos::Guide::updateProperty, Qt::UniqueConnection); + connect(m_Camera, &ISD::Camera::propertyUpdated, this, &Ekos::Guide::updateProperty, Qt::UniqueConnection); connect(m_Camera, &ISD::Camera::newExposureValue, this, &Ekos::Guide::checkExposureValue, Qt::UniqueConnection); syncCameraInfo(); @@ -2541,12 +2541,12 @@ "de_polarity:" << decPolarity; bool rc = sendMultiPulse(raPolarity > 0 ? RA_INC_DIR : RA_DEC_DIR, raMsec, decPolarity > 0 ? DEC_INC_DIR : DEC_DEC_DIR, - decMsec, StartCaptureAfterPulses); + decMsec, DontCaptureAfterPulses); if (rc) { qCInfo(KSTARS_EKOS_GUIDE) << "Non-guiding dither successful."; - QTimer::singleShot( (raMsec > decMsec ? raMsec : decMsec) + Options::ditherSettle() * 1000 + 100, [this]() + QTimer::singleShot( (raMsec > decMsec ? raMsec : decMsec) + Options::ditherSettle() * 1000 + 100, this, [this]() { emit newStatus(GUIDE_DITHERING_SUCCESS); m_State = GUIDE_IDLE; @@ -3135,8 +3135,6 @@ starCenter = QVector3D(); camera->setScopeInfo(m_FocalLength * m_Reducer, m_Aperture); - - auto scope = OpticalTrainManager::Instance()->getScope(name); opticalTrainCombo->setToolTip(QString("%1 @ %2").arg(camera->getDeviceName(), scope["name"].toString())); } setCamera(camera); diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/kstarsactions.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/kstarsactions.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/kstarsactions.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/kstarsactions.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -368,7 +368,7 @@ telescopeGroup->setEnabled(enable); if (enable == false) { - for (QAction *a : telescopeGroup->actions()) + for (auto &a : telescopeGroup->actions()) { a->setChecked(false); } @@ -380,7 +380,7 @@ domeGroup->setEnabled(enable); if (enable == false) { - for (QAction *a : domeGroup->actions()) + for (auto &a : domeGroup->actions()) { a->setChecked(false); } @@ -1687,7 +1687,7 @@ } actionCollection() ->action("coordsys") - ->setText(i18n("Switch to Horizonal View (Horizontal &Coordinates)")); + ->setText(i18n("Switch to Horizontal View (Horizontal &Coordinates)")); actionCollection() ->action("up_orientation") ->setText(i18nc("Orientation of the sky map", "North &Up")); diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/kstars.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/kstars.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/kstars.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/kstars.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -334,7 +334,7 @@ actionCollection() ->action("coordsys") ->setText(Options::useAltAz() ? i18n("Switch to Star Globe View (Equatorial &Coordinates)") : - i18n("Switch to Horizonal View (Horizontal &Coordinates)")); + i18n("Switch to Horizontal View (Horizontal &Coordinates)")); actionCollection()->action("show_time_box")->setChecked(Options::showTimeBox()); actionCollection()->action("show_location_box")->setChecked(Options::showGeoBox()); diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/kstarsinit.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/kstarsinit.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/kstarsinit.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/kstarsinit.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -145,7 +145,7 @@ // ==== File menu ================ ka = new QAction(QIcon::fromTheme("favorites"), i18n("Download New Data..."), this); connect(ka, &QAction::triggered, this, &KStars::slotDownload); - ka->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N)); + actionCollection()->setDefaultShortcut(ka, QKeySequence(Qt::CTRL + Qt::Key_N)); ka->setWhatsThis(i18n("Downloads new data")); ka->setToolTip(ka->whatsThis()); ka->setStatusTip(ka->whatsThis()); @@ -261,7 +261,7 @@ actionCollection()->addAction("coordsys", this, SLOT(slotCoordSys())) << (Options::useAltAz() ? i18n("Switch to Star Globe View (Equatorial &Coordinates)") : - i18n("Switch to Horizonal View (Horizontal &Coordinates)")) + i18n("Switch to Horizontal View (Horizontal &Coordinates)")) << QKeySequence("Space"); actionCollection()->addAction("toggle_terrain", this, SLOT(slotTerrain())) @@ -539,9 +539,9 @@ actionCollection()->addAction("timestep_control", wa) << i18n("Time step control"); const auto unitbox = m_TimeStepBox->unitbox(); ka = actionCollection()->addAction("timestep_increase_units", unitbox->increaseUnitsAction()); - ka->setShortcut(QKeySequence(Qt::Key_Plus)); + actionCollection()->setDefaultShortcut(ka, QKeySequence(Qt::Key_Plus)); ka = actionCollection()->addAction("timestep_decrease_units", unitbox->decreaseUnitsAction()); - ka->setShortcut(QKeySequence(Qt::Key_Underscore)); + actionCollection()->setDefaultShortcut(ka, QKeySequence(Qt::Key_Underscore)); // ==== viewToolBar actions ================ actionCollection()->add("show_stars", this, SLOT(slotViewToolBar())) diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/python/CMakeLists.txt kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/python/CMakeLists.txt --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/python/CMakeLists.txt 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/python/CMakeLists.txt 2023-06-19 04:07:23.000000000 +0000 @@ -21,7 +21,8 @@ ) # remove --no-undefined because that does not make sense here -string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS}) +# gc-sections to remove bloat +string(REPLACE "-Wl,--no-undefined" "-Wl,--gc-sections" CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS}) string(REPLACE "-fPIE " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) pybind11_add_module(pykstars MODULE src/pykstars.cpp) diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/skycomponents/supernovaecomponent.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/skycomponents/supernovaecomponent.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/kstars/skycomponents/supernovaecomponent.cpp 2023-06-01 18:43:04.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/kstars/skycomponents/supernovaecomponent.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -74,25 +74,19 @@ void SupernovaeComponent::loadData() { - qDebug() << "SupernovaeComponent::loadData\n"; qDeleteAll(m_ObjectList); m_ObjectList.clear(); objectNames(SkyObject::SUPERNOVA).clear(); objectLists(SkyObject::SUPERNOVA).clear(); - //QString name, type, host, date, ra, de; - - QString sFileName = - KSPaths::locate(QStandardPaths::AppLocalDataLocation, QString(tnsDataFilename)); - - std::string s; + auto sFileName = KSPaths::locate(QStandardPaths::AppLocalDataLocation, QString(tnsDataFilename)); try { io::CSVReader<26, io::trim_chars<' '>, io::double_quote_escape<',', '\"'>, - io::ignore_overflow> - in(sFileName.toLocal8Bit()); + io::ignore_overflow> + in(sFileName.toLocal8Bit()); // skip header const char *line = in.next_line(); if (line == nullptr) @@ -113,14 +107,12 @@ std::string discovery_filter, discovery_date_s, sender, remarks, discovery_bibcode, classification_bibcode, ext_catalog; - int i = 0; - while (in.read_row( - id, name, ra_s, dec_s, type, redshift, host_name, host_redshift, - reporting_group, disc_datasource, classifying_group, assoc_group, - disc_internal_name, disc_instrument, classifying_instrument, tns_at, - is_public, end_prop_period, discovery_mag, discovery_filter, discovery_date_s, - sender, remarks, discovery_bibcode, classification_bibcode, ext_catalog)) + id, name, ra_s, dec_s, type, redshift, host_name, host_redshift, + reporting_group, disc_datasource, classifying_group, assoc_group, + disc_internal_name, disc_instrument, classifying_instrument, tns_at, + is_public, end_prop_period, discovery_mag, discovery_filter, discovery_date_s, + sender, remarks, discovery_bibcode, classification_bibcode, ext_catalog)) { auto discovery_date = QDateTime::fromString(discovery_date_s.c_str(), Qt::ISODate); @@ -132,27 +124,24 @@ qname, ra, dec, QString(type.c_str()), QString(host_name.c_str()), QString(discovery_date_s.c_str()), redshift, discovery_mag, discovery_date); -// qDebug() << i++ << ":" << id.c_str() << " " << name.c_str() -// << "mag:" << discovery_mag << "date:" << discovery_date << "\n"; - objectNames(SkyObject::SUPERNOVA).append(QString(name.c_str())); appendListObject(sup); objectLists(SkyObject::SUPERNOVA) - .append(QPair(qname, sup)); + .append(QPair(qname, sup)); } - qDebug() << i << "supernovae loaded\n"; m_DataLoading = false; m_DataLoaded = true; } - catch (io::error::can_not_open_file& ex) + catch (io::error::can_not_open_file &ex) { - qCritical() << "could not open file " << sFileName.toLocal8Bit() << "\n"; + qCCritical(KSTARS) << "could not open file " << sFileName.toLocal8Bit() << "\n"; return; } - catch (std::exception &ex){ - qCritical() << "unknown exception happened:" << ex.what() << "\n"; + catch (std::exception &ex) + { + qCCritical(KSTARS) << "unknown exception happened:" << ex.what() << "\n"; } } @@ -164,7 +153,7 @@ SkyObject *oBest = nullptr; double rBest = maxrad; - for (auto so : m_ObjectList) + for (auto &so : m_ObjectList) { double r = so->angularDistanceTo(p).Degrees(); //qDebug()<setBrush(m_TextBrush); painter->setPen(m_TextPen); - defaultFont.setPointSize(8 * pixelScale * m_CameraFOV.width() / 60.); + defaultFont.setPointSize(qMax(1., 8 * pixelScale * m_CameraFOV.width() / 60.)); painter->setFont(defaultFont); painter->drawText(oneRect, Qt::AlignRight | Qt::AlignTop, QString("%1.").arg(tile->index)); - defaultFont.setPointSize(5 * pixelScale * m_CameraFOV.width() / 60.); + defaultFont.setPointSize(qMax(1., 5 * pixelScale * m_CameraFOV.width() / 60.)); painter->setFont(defaultFont); painter->drawText(oneRect, Qt::AlignHCenter | Qt::AlignVCenter, QString("%1\n%2") .arg(tile->skyCenter.ra0().toHMSString(), tile->skyCenter.dec0().toDMSString())); diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/Tests/kstars_ui/test_ekos_capture_workflow.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/Tests/kstars_ui/test_ekos_capture_workflow.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/Tests/kstars_ui/test_ekos_capture_workflow.cpp 2023-06-01 18:43:03.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/Tests/kstars_ui/test_ekos_capture_workflow.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -474,33 +474,36 @@ KTRY_CLICK(capture, rotatorB); // ensure that the rotator dialog appears - QTest::qWait(2000); - QWidget *rotatorDialog = Ekos::Manager::Instance()->findChild("RotatorDialog"); - QVERIFY(rotatorDialog != nullptr); + QWidget *rotatorDialog = nullptr; + QTRY_VERIFY_WITH_TIMEOUT((rotatorDialog = Ekos::Manager::Instance()->findChild("RotatorDialog")) != nullptr, + 10000); // target angle rotation double targetAngle = 90.0; - // enforce rotation - KTRY_SET_CHECKBOX(rotatorDialog, enforceRotationCheck, true); // set the target rotation angle - KTRY_SET_DOUBLESPINBOX(rotatorDialog, positionAngleSpin, targetAngle); - // Close with OK - KTRY_GADGET(rotatorDialog, QDialogButtonBox, buttonBox); - QTest::mouseClick(buttonBox->button(QDialogButtonBox::Ok), Qt::LeftButton); + KTRY_SET_DOUBLESPINBOX(rotatorDialog, CameraPA, targetAngle); + // save it to the sequence job + KTRY_SET_CHECKBOX(rotatorDialog, enforceJobPA, true); // build a simple 1xL sequence KTRY_CAPTURE_ADD_LIGHT(30.0, 1, 5.0, "Luminance", getImageLocation()->path() + "/test"); // expect capturing state m_CaptureHelper->expectedCaptureStates.append(Ekos::CAPTURE_CAPTURING); + // set the rotation angle back + CameraPA->setValue(0); + // let the rotator rotate back for at least 3sec + QTest::qWait(3000); + // start capturing KTRY_CLICK(capture, startB); // check if capturing has started KVERIFY_EMPTY_QUEUE_WITH_TIMEOUT(m_CaptureHelper->expectedCaptureStates, 60000); - KTRY_GADGET(rotatorDialog, QLineEdit, rawAngleOut); - QTRY_VERIFY2(fabs(rawAngleOut->text().toDouble() - targetAngle) * 60 <= Options::astrometryRotatorThreshold(), - QString("Rotator angle %1° not at the expected value of %2°").arg(rawAngleOut->text()).arg(targetAngle).toLocal8Bit()); + // KTRY_GADGET(rotatorDialog, QLineEdit, rawAngleOut); + // QTRY_VERIFY2(fabs(rawAngleOut->text().toDouble() - targetAngle) * 60 <= Options::astrometryRotatorThreshold(), + // QString("Rotator angle %1° not at the expected value of %2°").arg(rawAngleOut->text()).arg(targetAngle).toLocal8Bit()); + QWARN("Since the rotator interface has changed, the correct rotator angle cannot be checked from the test case."); } void TestEkosCaptureWorkflow::testFlatManualSource() @@ -512,12 +515,11 @@ Ekos::Capture *capture = Ekos::Manager::Instance()->captureModule(); KTRY_SWITCH_TO_MODULE_WITH_TIMEOUT(capture, 1000); - // use a test directory for darks + // use a test directory QString imagepath = getImageLocation()->path() + "/test"; // switch capture type to flat so that we can set the calibration - KTRY_CAPTURE_GADGET(QComboBox, captureTypeS); - KTRY_CAPTURE_COMBO_SET(captureTypeS, "Flat"); + KTRY_SET_COMBO(capture, captureTypeS, "Flat"); // select manual flat method KTRY_SELECT_FLAT_METHOD(manualSourceC, false, false); @@ -530,13 +532,13 @@ QFETCH(bool, clickModal2OK); if (clickModalOK) { - // start the flat sequence + // start the flat/dark/bias sequence m_CaptureHelper->expectedCaptureStates.append(Ekos::CAPTURE_IMAGE_RECEIVED); m_CaptureHelper->expectedCaptureStates.append(Ekos::CAPTURE_IDLE); KTRY_CLICK(capture, startB); // click OK in the modal dialog for covering the telescope CLOSE_MODAL_DIALOG(0); - // check if one single flat is captured + // check if one single frame is captured KVERIFY_EMPTY_QUEUE_WITH_TIMEOUT(m_CaptureHelper->expectedCaptureStates, 60000); if (clickModal2OK) { @@ -580,7 +582,7 @@ } -void TestEkosCaptureWorkflow::testFlatLightPanelSource() +void TestEkosCaptureWorkflow::testLightPanelSource() { // use the light panel simulator m_CaptureHelper->m_LightPanelDevice = "Light Panel Simulator"; @@ -594,9 +596,9 @@ // use a test directory for flats QString imagepath = getImageLocation()->path() + "/test"; - // switch capture type to flat so that we can set the calibration - KTRY_CAPTURE_GADGET(QComboBox, captureTypeS); - KTRY_CAPTURE_COMBO_SET(captureTypeS, "Flat"); + // switch capture type to the selected type so that we can set the calibration + QFETCH(QString, frametype); + KTRY_SET_COMBO(capture, captureTypeS, frametype); // select internal or external flat light QFETCH(bool, internalLight); @@ -604,8 +606,8 @@ KTRY_SELECT_FLAT_METHOD(flatDeviceSourceC, false, false); else KTRY_SELECT_FLAT_METHOD(darkDeviceSourceC, false, false); - // build a simple 1xL flat sequence - KTRY_CAPTURE_ADD_FRAME("Flat", 1, 1, 0.0, "Luminance", imagepath); + // build a simple 1xL sequence + KTRY_CAPTURE_ADD_FRAME(frametype, 1, 1, 0.0, "Luminance", imagepath); // build a simple 1xL light sequence KTRY_CAPTURE_ADD_LIGHT(1, 1, 0.0, "Red", imagepath); @@ -663,9 +665,8 @@ QString imagepath = getImageLocation()->path() + "/test"; // switch capture type to flat so that we can set the calibration - KTRY_CAPTURE_GADGET(QComboBox, captureTypeS); + KTRY_SET_COMBO(capture, captureTypeS, "Flat"); QTRY_VERIFY_WITH_TIMEOUT(captureTypeS->findText("Flat", Qt::MatchExactly) >= 0, 5000); - KTRY_CAPTURE_COMBO_SET(captureTypeS, "Flat"); // select frame type and internal or external flat light QFETCH(bool, internalLight); @@ -707,8 +708,7 @@ QString imagepath = getImageLocation()->path() + "/test"; // switch capture type to flat so that we can set the calibration - KTRY_CAPTURE_GADGET(QComboBox, captureTypeS); - KTRY_CAPTURE_COMBO_SET(captureTypeS, "Flat"); + KTRY_SET_COMBO(capture, captureTypeS, "Flat"); // select the wall as flat light source (az=90°, alt=0) KTRY_SELECT_FLAT_WALL(capture, "90", "0"); @@ -735,7 +735,7 @@ } -void TestEkosCaptureWorkflow::testFlatPreMountAndDomePark() +void TestEkosCaptureWorkflow::testPreMountAndDomePark() { // use the light panel simulator m_CaptureHelper->m_LightPanelDevice = "Light Panel Simulator"; @@ -744,7 +744,7 @@ // default initialization QVERIFY(prepareTestCase()); - QSKIP("Observatory refactoring needs to be completed until this test can be activated."); + // QSKIP("Observatory refactoring needs to be completed until this test can be activated."); // switch to capture module Ekos::Capture *capture = Ekos::Manager::Instance()->captureModule(); @@ -754,16 +754,17 @@ QString imagepath = getImageLocation()->path() + "/test"; // switch capture type to flat so that we can set the calibration - KTRY_CAPTURE_GADGET(QComboBox, captureTypeS); - KTRY_CAPTURE_COMBO_SET(captureTypeS, "Flat"); + KTRY_SET_COMBO(capture, captureTypeS, "Flat"); - // select internal flat light, pre-mount and pre-dome park - KTRY_SELECT_FLAT_METHOD(flatDeviceSourceC, true, true); + // select internal flat light, pre-mount and but not pre-dome park + KTRY_SELECT_FLAT_METHOD(flatDeviceSourceC, true, false); + // determine frame type + QFETCH(QString, frametype); // build a simple 1xL sequence - KTRY_CAPTURE_ADD_FLAT(2, 1, 2.0, "Luminance", imagepath); + KTRY_CAPTURE_ADD_FRAME(frametype, 2, 1, 2.0, "Luminance", imagepath); // start the sequence - m_CaptureHelper->expectedDomeStates.append(ISD::Dome::DOME_PARKED); + // m_CaptureHelper->expectedDomeStates.append(ISD::Dome::DOME_PARKED); m_CaptureHelper->expectedMountStates.append(ISD::Mount::MOUNT_PARKED); m_CaptureHelper->expectedCaptureStates.append(Ekos::CAPTURE_CAPTURING); m_CaptureHelper->expectedCaptureStates.append(Ekos::CAPTURE_COMPLETE); @@ -807,8 +808,7 @@ QString imagepath = getImageLocation()->path() + "/test"; // switch capture type to flat so that we can set the calibration - KTRY_CAPTURE_GADGET(QComboBox, captureTypeS); - KTRY_CAPTURE_COMBO_SET(captureTypeS, "Flat"); + KTRY_SET_COMBO(capture, captureTypeS, "Flat"); // select internal flat light KTRY_SELECT_FLAT_METHOD(flatDeviceSourceC, false, false); @@ -996,17 +996,26 @@ QTest::addColumn("clickModal2OK"); /*!< click "OK" on the second modal dialog */ // both variants: click OK and click Cancel - QTest::newRow("modal=true") << true << true; - QTest::newRow("modal=true") << true << false; - QTest::newRow("modal=false") << false << true; + QTest::newRow("Flat, modal=true") << true << true; + QTest::newRow("Flat, modal=true") << true << false; + QTest::newRow("Flat, modal=false") << false << true; } -void TestEkosCaptureWorkflow::testFlatLightPanelSource_data() +void TestEkosCaptureWorkflow::testLightPanelSource_data() { + QTest::addColumn("frametype"); /*!< frame type (Bias, Dark, Flat) */ QTest::addColumn("internalLight"); /*!< use internal or external flat light */ - QTest::newRow("light=internal") << true; // light source integrated into the light panel - QTest::newRow("light=external") << false; // external light source used + for (auto frametype : + { + "Flat", "Dark", "Bias" + }) + for (auto internalLight : // light source integrated into the light panel? + { + true, false + }) + QTest::newRow(QString("%1, light=%2").arg(frametype).arg(internalLight ? "internal" : "external").toLatin1()) + << frametype << internalLight; } void TestEkosCaptureWorkflow::testDustcapSource_data() @@ -1016,15 +1025,24 @@ // QTest::newRow("Flat, light=internal") << "Flat" << true; // flat + light source integrated into the light panel QTest::newRow("Flat, light=external") << "Flat" << false; // flat + external light source used + QTest::newRow("Dark, light=external") << "Dark" << false; // dark + external light source used + QTest::newRow("Bias, light=external") << "Bias" << false; // dark + external light source used // QTest::newRow("Dark") << "Dark" << false; // dark } void TestEkosCaptureWorkflow::testWallSource_data() { - QTest::addColumn("frametype"); /*!< frame type (Dark or Flat) */ + QTest::addColumn("frametype"); /*!< frame type (Dark, Flat or bias) */ QTest::newRow("Flat") << "Flat"; QTest::newRow("Dark") << "Dark"; + QTest::newRow("Bias") << "Bias"; +} + + +void TestEkosCaptureWorkflow::testPreMountAndDomePark_data() +{ + testWallSource_data(); } void TestEkosCaptureWorkflow::testDarkManualCovering_data() diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/Tests/kstars_ui/test_ekos_capture_workflow.h kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/Tests/kstars_ui/test_ekos_capture_workflow.h --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/Tests/kstars_ui/test_ekos_capture_workflow.h 2023-06-01 18:43:03.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/Tests/kstars_ui/test_ekos_capture_workflow.h 2023-06-19 04:07:23.000000000 +0000 @@ -24,8 +24,10 @@ // klick OK // open the calibration dialog #define KTRY_SELECT_FLAT_METHOD(sourceWidget, preMountPark, preDomePark) do { \ -QTimer::singleShot(1000, capture, [&]() { \ - QDialog *calibrationOptions = Ekos::Manager::Instance()->findChild("calibrationOptions"); \ +QTimer::singleShot(5000, capture, [&]() { \ + QDialog *calibrationOptions = nullptr; \ + if (! QTest::qWaitFor([&](){return ((calibrationOptions = Ekos::Manager::Instance()->findChild("calibrationOptions")) != nullptr);}, 5000)) { \ + QFAIL(qPrintable("Calibrations options dialog not found!")); } \ KTRY_GADGET(calibrationOptions, QAbstractButton, sourceWidget); \ sourceWidget->setChecked(true); \ KTRY_GADGET(calibrationOptions, QCheckBox, parkMountC); \ @@ -53,7 +55,7 @@ QVERIFY(nullptr != buttons); \ QTest::mouseClick(buttons->button(QDialogButtonBox::Ok), Qt::LeftButton); \ }); \ -KTRY_CAPTURE_CLICK(calibrationB); } while (false) +KTRY_CLICK(Ekos::Manager::Instance()->captureModule(), calibrationB); } while (false) class TestEkosCaptureWorkflow : public QObject @@ -177,12 +179,12 @@ void testFlatManualSource_data(); /** - * @brief Test capturing flats with a lights panel + * @brief Test capturing flats, darks and bias with a lights panel */ - void testFlatLightPanelSource(); + void testLightPanelSource(); - /** @brief Test data for {@see testFlatLightPanelSource()} */ - void testFlatLightPanelSource_data(); + /** @brief Test data for {@see testLightPanelSource()} */ + void testLightPanelSource_data(); /** * @brief Test capturing flats or darks with a dust cap @@ -203,7 +205,10 @@ /** * @brief Check mount and dome parking before capturing flats. */ - void testFlatPreMountAndDomePark(); + void testPreMountAndDomePark(); + + /** @brief Test data for {@see testFlatPreMountAndDomePark()} */ + void testPreMountAndDomePark_data(); /** * @brief Check the flat capture behavior if "same focus" is selectee diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/Tests/kstars_ui/test_ekos_helper.cpp kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/Tests/kstars_ui/test_ekos_helper.cpp --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/Tests/kstars_ui/test_ekos_helper.cpp 2023-06-01 18:43:03.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/Tests/kstars_ui/test_ekos_helper.cpp 2023-06-19 04:07:23.000000000 +0000 @@ -474,7 +474,7 @@ // select the primary train for focusing KTRY_SET_COMBO(Ekos::Manager::Instance()->focusModule(), opticalTrainCombo, m_primaryTrain); // use full field - KTRY_SET_CHECKBOX(Ekos::Manager::Instance()->focusModule(), focusUseFullField, true); + KTRY_SET_RADIOBUTTON(Ekos::Manager::Instance()->focusModule(), focusUseFullField, true); //initial step size 5000 KTRY_SET_SPINBOX(Ekos::Manager::Instance()->focusModule(), focusTicks, 5000); // max travel 100000 @@ -491,11 +491,13 @@ KTRY_SET_DOUBLESPINBOX(Ekos::Manager::Instance()->focusModule(), focusFullFieldInnerRadius, 0.0); KTRY_SET_DOUBLESPINBOX(Ekos::Manager::Instance()->focusModule(), focusFullFieldOuterRadius, 100.0); // try to make focusing fast, precision is not relevant here - KTRY_SET_DOUBLESPINBOX(Ekos::Manager::Instance()->focusModule(), focusOutSteps, 1.0); + KTRY_SET_DOUBLESPINBOX(Ekos::Manager::Instance()->focusModule(), focusOutSteps, 3.0); // select the Luminance filter KTRY_SET_COMBO(Ekos::Manager::Instance()->focusModule(), focusFilter, "Luminance"); // select SEP algorithm for star detection KTRY_SET_COMBO(Ekos::Manager::Instance()->focusModule(), focusDetection, "SEP"); + // select HFR a star focus measure + KTRY_SET_COMBO(Ekos::Manager::Instance()->focusModule(), focusStarMeasure, "HFR"); // set exp time for current filter KTRY_SET_DOUBLESPINBOX(Ekos::Manager::Instance()->focusModule(), focusExposure, 1.0); // set exposure times for all filters diff -Nru kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/Tests/kstars_ui/test_ekos_helper.h kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/Tests/kstars_ui/test_ekos_helper.h --- kstars-bleeding-3.6.5+202306011843~ubuntu23.04.1/Tests/kstars_ui/test_ekos_helper.h 2023-06-01 18:43:03.000000000 +0000 +++ kstars-bleeding-3.6.5+202306190407~ubuntu23.04.1/Tests/kstars_ui/test_ekos_helper.h 2023-06-19 04:07:23.000000000 +0000 @@ -106,7 +106,7 @@ * @warning Fails the test if the gadget "name" of class "klass" does not exist in the Mount module */ #define KTRY_GADGET(module, klass, name) klass * const name = module->findChild(#name); \ - QVERIFY2(name != nullptr, QString(#klass " '%1' does not exist and cannot be used").arg(#name).toStdString().c_str()) + QTRY_VERIFY2_WITH_TIMEOUT(name != nullptr, QString(#klass " '%1' does not exist and cannot be used").arg(#name).toStdString().c_str(), 10000) /** @brief Helper to retrieve a gadget from a certain module view (subroutine version). * @param module KStars module that holds the checkox @@ -241,7 +241,7 @@ * @param value value the combo box should be set */ #define KTRY_SET_COMBO(module, combo, value) \ - KTRY_GADGET(module, QComboBox, combo); combo->setCurrentText(value); QVERIFY(combo->currentText() == value) + KTRY_GADGET(module, QComboBox, combo); combo->setCurrentText(value); QTRY_VERIFY_WITH_TIMEOUT(combo->currentText() == value, 1000) /** @brief Helper to set a combo box by index and verify whether it succeeded * @param module KStars module that holds the combo box