diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/Tests/kstars_ui/CMakeLists.txt kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/Tests/kstars_ui/CMakeLists.txt --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/Tests/kstars_ui/CMakeLists.txt 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/Tests/kstars_ui/CMakeLists.txt 2023-12-26 04:50:30.000000000 +0000 @@ -101,7 +101,7 @@ ADD_EXECUTABLE( test_ekos_meridianflipstate ${KSTARS_UI_EKOS_SRC} test_ekos_helper.cpp test_ekos_meridianflipstate.cpp) TARGET_LINK_LIBRARIES( test_ekos_meridianflipstate ${TEST_LIBRARIES}) ADD_TEST( NAME TestEkosMeridianFlipState COMMAND test_ekos_meridianflipstate ) -SET_TESTS_PROPERTIES( TestEkosMeridianFlipState PROPERTIES LABELS "unstable;ui" TIMEOUT 120 ) +SET_TESTS_PROPERTIES( TestEkosMeridianFlipState PROPERTIES LABELS "stable;ui" TIMEOUT 120 ) ADD_EXECUTABLE(test_ekos_scheduler ${KSTARS_UI_EKOS_SRC} test_ekos_scheduler.cpp) TARGET_LINK_LIBRARIES(test_ekos_scheduler ${KSTARS_UI_EKOS_LIBS}) diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/Tests/kstars_ui/test_ekos_meridianflipstate.cpp kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/Tests/kstars_ui/test_ekos_meridianflipstate.cpp --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/Tests/kstars_ui/test_ekos_meridianflipstate.cpp 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/Tests/kstars_ui/test_ekos_meridianflipstate.cpp 2023-12-26 04:50:30.000000000 +0000 @@ -12,6 +12,7 @@ #include "kstars_ui_tests.h" #include "test_ekos_debug.h" #include "kstarsdata.h" +#include "Options.h" #include "skymapcomposite.h" #include "indicom.h" @@ -33,9 +34,9 @@ // find a target 10 sec before meridian SkyPoint target = findMFTestTarget(base_offset, upper); m_Mount->Slew(target); - // expect finished slew + // expect finished slew to target close to the meridian QTRY_VERIFY_WITH_TIMEOUT(expectedMountStates.isEmpty(), 10000); - QVERIFY(m_currentPosition.position == target); + QVERIFY(m_currentPosition.valid && m_currentPosition.position == target); QVERIFY2(m_currentPosition.ha.HoursHa() - (upper ? 0 : 12) < 0, QString("Current HA=%1").arg(m_currentPosition.ha.HoursHa()).toLatin1()); QVERIFY(std::abs(m_currentPosition.ha.HoursHa() - (upper ? 0 : 12) + base_offset/3600) * 3600 <= 20.0); // less than 20 arcsec error QVERIFY(m_currentPosition.pierSide == (upper ? ISD::Mount::PIER_WEST : ISD::Mount::PIER_EAST)); @@ -68,8 +69,8 @@ // wait until the slew completes QTRY_VERIFY_WITH_TIMEOUT(expectedMountStates.isEmpty(), 10000); // meridian flip should be completed - QVERIFY(expectedMeridianFlipMountStates.isEmpty()); - // mount is pointing east for upper, west for lower culmination + QTRY_VERIFY_WITH_TIMEOUT(expectedMeridianFlipMountStates.isEmpty(), 3*Options::minFlipDuration()); + // mount is on the east side for upper, west for lower culmination QVERIFY(m_currentPosition.pierSide == (upper ? ISD::Mount::PIER_EAST : ISD::Mount::PIER_WEST)); } else @@ -250,6 +251,8 @@ m_stateMachine->setOffset(offset); // clear current position m_currentPosition.valid = false; + // set delay of 5s to ignore too early tracking + Options::setMinFlipDuration(10); // connect the test adaptor to the test case connectAdaptor(); } @@ -278,6 +281,17 @@ void MountSimulator::updatePosition() { + if (m_status == ISD::Mount::MOUNT_SLEWING && KStarsData::Instance()->clock()->utc() > slewFinishedTime) + { + // slew finished + m_position = m_targetPosition; + m_pierside = m_targetPierside; + emit newCoords(m_position, m_pierside, calcHA(m_position)); + setStatus(ISD::Mount::MOUNT_TRACKING); + qCInfo(KSTARS_EKOS_TEST) << "Mount tracking."; + } + + // in any case, report the current position emit newCoords(m_position, m_pierside, calcHA(m_position)); } @@ -287,7 +301,7 @@ // regularly report the position and recalculated HA connect(KStarsData::Instance()->clock(), &SimClock::timeAdvanced, this, &MountSimulator::updatePosition); // set state to tracking - emit newStatus(ISD::Mount::MOUNT_TRACKING); + setStatus(ISD::Mount::MOUNT_TRACKING); } void MountSimulator::shutdown() @@ -298,17 +312,16 @@ void MountSimulator::Slew(const SkyPoint &position) { // start slewing - emit newStatus(ISD::Mount::MOUNT_SLEWING); + setStatus(ISD::Mount::MOUNT_SLEWING); qCInfo(KSTARS_EKOS_TEST) << "Mount slewing..."; + m_targetPosition = position; + m_targetPierside = calcPierSide(position); + // calculate an additional delay if pier side needs to be changed + double delay = (m_pierside == ISD::Mount::PIER_UNKNOWN || m_pierside == m_targetPierside) ? 0. : 2. * Options::minFlipDuration(); QTest::qWait(100); - // slew finished, track - m_position = position; - m_pierside = calcPierSide(position); - dms ha = calcHA(position); - emit newCoords(m_position, m_pierside, ha); - emit newStatus(ISD::Mount::MOUNT_TRACKING); - emit newCoords(m_position, m_pierside, ha); - qCInfo(KSTARS_EKOS_TEST) << "Mount tracking."; + // set time when slew should be finished and tracking should start + slewFinishedTime = KStarsData::Instance()->clock()->utc().addSecs(delay); + // slewing, pier side change and changing back to tracking will be handled by #updatePosition() } void MountSimulator::Sync(const SkyPoint &position) @@ -319,7 +332,15 @@ m_pierside = calcPierSide(position); emit newCoords(m_position, m_pierside, calcHA(position)); - emit newStatus(ISD::Mount::MOUNT_TRACKING); + setStatus(ISD::Mount::MOUNT_TRACKING); +} + +void MountSimulator::setStatus(ISD::Mount::Status value) +{ + if (m_status != value) + emit newStatus(value); + + m_status = value; } dms MountSimulator::calcHA(const SkyPoint &pos) diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/Tests/kstars_ui/test_ekos_meridianflipstate.h kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/Tests/kstars_ui/test_ekos_meridianflipstate.h --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/Tests/kstars_ui/test_ekos_meridianflipstate.h 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/Tests/kstars_ui/test_ekos_meridianflipstate.h 2023-12-26 04:50:30.000000000 +0000 @@ -60,7 +60,7 @@ // current mount position Ekos::MeridianFlipState::MountPosition m_currentPosition; - // current mount status + // current and target mount status ISD::Mount::Status m_MountStatus { ISD::Mount::MOUNT_IDLE }; // sequence of mount states that are expected QQueue expectedMountStates; @@ -121,13 +121,22 @@ void Slew(const SkyPoint &position); void Sync(const SkyPoint &position); + void setStatus(ISD::Mount::Status newStatus); + signals: void newCoords(const SkyPoint &position, const ISD::Mount::PierSide pierside, const dms &ha); void newStatus(ISD::Mount::Status status); private: + ISD::Mount::Status m_status {ISD::Mount::MOUNT_IDLE}; + // current position SkyPoint m_position; ISD::Mount::PierSide m_pierside { ISD::Mount::PIER_UNKNOWN}; + // target position + SkyPoint m_targetPosition; + ISD::Mount::PierSide m_targetPierside { ISD::Mount::PIER_UNKNOWN}; + // time stamps for slewing finished and for flipping pier side + KStarsDateTime slewFinishedTime; void updatePosition(); dms calcHA(const SkyPoint &pos); diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/Tests/kstars_ui/test_kstars_startup.cpp kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/Tests/kstars_ui/test_kstars_startup.cpp --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/Tests/kstars_ui/test_kstars_startup.cpp 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/Tests/kstars_ui/test_kstars_startup.cpp 2023-12-26 04:50:30.000000000 +0000 @@ -142,6 +142,7 @@ QCOMPARE(KStars::Instance()->data()->clock()->isActive(), m_InitialConditions.clockRunning); + /* QEXPECT_FAIL("", "Initial KStars clock is set from system local time, not geolocation, and is untestable for now.", Continue); QCOMPARE(KStars::Instance()->data()->clock()->utc().toString(), m_InitialConditions.dateTime.toString()); @@ -149,6 +150,7 @@ QEXPECT_FAIL("", "Precision of KStars local time conversion to local time does not allow strict millisecond comparison.", Continue); QCOMPARE(KStars::Instance()->data()->clock()->utc().toLocalTime(), m_InitialConditions.dateTime); + */ #if QT_VERSION >= 0x050800 // However comparison down to nearest second is expected to be OK diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/debian/changelog kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/debian/changelog --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/debian/changelog 2023-12-11 18:12:29.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/debian/changelog 2023-12-26 04:50:34.000000000 +0000 @@ -1,8 +1,8 @@ -kstars-bleeding (6:3.6.8+202312111812~ubuntu23.04.1) lunar; urgency=low +kstars-bleeding (6:3.6.8+202312260450~ubuntu23.04.1) lunar; urgency=low * Auto build. - -- Jasem Mutlaq Mon, 11 Dec 2023 18:12:29 +0000 + -- Jasem Mutlaq Tue, 26 Dec 2023 04:50:34 +0000 kstars-bleeding (6:3.6.8) jammy; urgency=medium diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/debian/git-build-recipe.manifest kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/debian/git-build-recipe.manifest --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/debian/git-build-recipe.manifest 2023-12-11 18:12:29.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/debian/git-build-recipe.manifest 2023-12-26 04:50:34.000000000 +0000 @@ -1,3 +1,3 @@ -# git-build-recipe format 0.4 deb-version {debversion}+202312111812 -lp:~mutlaqja/kstars-bleeding/+git/kstars-master git-commit:87d93bb90433502cbded22cead343cde53a5c722 -nest-part packaging lp:~mutlaqja/kstars-bleeding/+git/kstars-master packaging/linux/debian debian git-commit:87d93bb90433502cbded22cead343cde53a5c722 +# git-build-recipe format 0.4 deb-version {debversion}+202312260450 +lp:~mutlaqja/kstars-bleeding/+git/kstars-master git-commit:f2af0c8cc14a400fe4eed09c65be7daebea74f7f +nest-part packaging lp:~mutlaqja/kstars-bleeding/+git/kstars-master packaging/linux/debian debian git-commit:f2af0c8cc14a400fe4eed09c65be7daebea74f7f diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/capture/capture.cpp kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/capture/capture.cpp --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/capture/capture.cpp 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/capture/capture.cpp 2023-12-26 04:50:30.000000000 +0000 @@ -1232,7 +1232,7 @@ updateFrameProperties(); else if ((prop.isNameMatch("CCD_INFO") && state()->useGuideHead() == false) || (prop.isNameMatch("GUIDER_INFO") && state()->useGuideHead())) - updateFrameProperties(2); + updateFrameProperties(1); else if (prop.isNameMatch("CCD_TRANSFER_FORMAT") || prop.isNameMatch("CCD_CAPTURE_FORMAT")) updateCaptureFormats(); else if (prop.isNameMatch("CCD_CONTROLS")) @@ -2750,32 +2750,47 @@ int bin = settings["bin"].toInt(1); setBinning(bin, bin); - double temperature = settings["temperature"].toDouble(INVALID_VALUE); - if (temperature > INVALID_VALUE && devices()->getActiveCamera() - && devices()->getActiveCamera()->hasCoolerControl()) + if (settings["temperature"].isString() && settings["temperature"].toString() == "--") + setForceTemperature(false); + else { - setForceTemperature(true); - setTargetTemperature(temperature); + double temperature = settings["temperature"].toDouble(INVALID_VALUE); + if (temperature > INVALID_VALUE && devices()->getActiveCamera() + && devices()->getActiveCamera()->hasCoolerControl()) + { + setForceTemperature(true); + setTargetTemperature(temperature); + } + else + setForceTemperature(false); } - else - setForceTemperature(false); - double gain = settings["gain"].toDouble(GainSpinSpecialValue); - if (devices()->getActiveCamera() && devices()->getActiveCamera()->hasGain()) + if (settings["gain"].isString() && settings["gain"].toString() == "--") + captureGainN->setValue(GainSpinSpecialValue); + else { - if (gain == GainSpinSpecialValue) - captureGainN->setValue(GainSpinSpecialValue); - else - setGain(gain); + double gain = settings["gain"].toDouble(GainSpinSpecialValue); + if (devices()->getActiveCamera() && devices()->getActiveCamera()->hasGain()) + { + if (gain == GainSpinSpecialValue) + captureGainN->setValue(GainSpinSpecialValue); + else + setGain(gain); + } } - double offset = settings["offset"].toDouble(OffsetSpinSpecialValue); - if (devices()->getActiveCamera() && devices()->getActiveCamera()->hasOffset()) + if (settings["offset"].isString() && settings["offset"].toString() == "--") + captureOffsetN->setValue(OffsetSpinSpecialValue); + else { - if (offset == OffsetSpinSpecialValue) - captureOffsetN->setValue(OffsetSpinSpecialValue); - else - setOffset(offset); + double offset = settings["offset"].toDouble(OffsetSpinSpecialValue); + if (devices()->getActiveCamera() && devices()->getActiveCamera()->hasOffset()) + { + if (offset == OffsetSpinSpecialValue) + captureOffsetN->setValue(OffsetSpinSpecialValue); + else + setOffset(offset); + } } int transferFormat = settings["transferFormat"].toInt(-1); diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/capture/captureprocess.cpp kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/capture/captureprocess.cpp --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/capture/captureprocess.cpp 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/capture/captureprocess.cpp 2023-12-26 04:50:30.000000000 +0000 @@ -775,7 +775,8 @@ return IPS_BUSY; // step 7: resume guiding if it was suspended - if (state()->getGuideState() == GUIDE_SUSPENDED) + // JM 2023.12.20: Must make to resume if we have a light frame. + if (state()->getGuideState() == GUIDE_SUSPENDED && activeJob()->getFrameType() == FRAME_LIGHT) { emit newLog(i18n("Autoguiding resumed.")); emit resumeGuiding(); diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/capture/placeholderpath.cpp kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/capture/placeholderpath.cpp --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/capture/placeholderpath.cpp 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/capture/placeholderpath.cpp 2023-12-26 04:50:30.000000000 +0000 @@ -259,7 +259,7 @@ case PP_TYPE_DOUBLE: return QString::number(pathPropertyMap[property].toDouble(), 'd', 0); case PP_TYPE_UINT: - return QString::number(pathPropertyMap[property].toUInt()); + return QString::number(pathPropertyMap[property].toUInt()); case PP_TYPE_POINT: return QString("%1x%2").arg(pathPropertyMap[PP_BIN].toPoint().x()).arg(pathPropertyMap[PP_BIN].toPoint().y()); case PP_TYPE_STRING: @@ -602,8 +602,8 @@ // found '.', then remove extension sig_file = sig_file.left(index); } - qCDebug(KSTARS_EKOS_SCHEDULER) << "Scheduler::getCompletedFiles path:" << path << " sig_dir:" << sig_dir << " sig_file:" << - sig_file; + qCDebug(KSTARS_EKOS_CAPTURE) << "Scheduler::PlaceholderPath path:" << path << " sig_dir:" << sig_dir << " sig_file:" << + sig_file; #else QFileInfo const path_info(path); QString const sig_dir(path_info.dir().path()); diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/ekoslive/media.cpp kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/ekoslive/media.cpp --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/ekoslive/media.cpp 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/ekoslive/media.cpp 2023-12-26 04:50:30.000000000 +0000 @@ -357,6 +357,8 @@ {"mean", imageData->getAverageMean()}, {"median", imageData->getAverageMedian()}, {"stddev", imageData->getAverageStdDev()}, + {"min", imageData->getMin()}, + {"max", imageData->getMax()}, {"bin", QString("%1x%2").arg(xbin.toString(), ybin.toString())}, {"bpp", QString::number(imageData->bpp())}, {"uuid", m_UUID}, diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/manager/meridianflipstate.cpp kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/manager/meridianflipstate.cpp --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/manager/meridianflipstate.cpp 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/manager/meridianflipstate.cpp 2023-12-26 04:50:30.000000000 +0000 @@ -5,6 +5,7 @@ */ #include "meridianflipstate.h" +#include "Options.h" #include "kstarsdata.h" #include "indicom.h" @@ -233,56 +234,57 @@ case MOUNT_FLIP_RUNNING: if (m_MountStatus == ISD::Mount::MOUNT_TRACKING) { - // meridian flip slew completed, did it work? - bool flipFailed = false; - - // pointing state change check only for mounts that report pier side - if (currentPosition.pierSide == ISD::Mount::PIER_UNKNOWN) + if (minMeridianFlipEndTime <= KStarsData::Instance()->clock()->utc()) { - // check how long it took - if (minMeridianFlipEndTime > QDateTime::currentDateTimeUtc()) + // meridian flip slew completed, did it work? + // check tracking only when the minimal flip duration has passed + bool flipFailed = false; + + // pointing state change check only for mounts that report pier side + if (currentPosition.pierSide == ISD::Mount::PIER_UNKNOWN) { - // don't fail, we have tried but we don't know where the mount was when it started - appendLogText(i18n("Meridian flip failed - time too short, pier side unknown.")); + appendLogText(i18n("Assuming meridian flip completed, but pier side unknown.")); // signal that capture can resume updateMFMountState(MOUNT_FLIP_COMPLETED); return false; } - } - else if (currentPosition.pierSide == initialPierSide) - { - flipFailed = true; - qCWarning(KSTARS_EKOS_MOUNT) << "Meridian flip failed, pier side not changed"; - } + else if (currentPosition.pierSide == initialPierSide) + { + flipFailed = true; + qCWarning(KSTARS_EKOS_MOUNT) << "Meridian flip failed, pier side not changed"; + } - if (flipFailed) - { - if (getFlipDelayHrs() <= 1.0) + if (flipFailed) { - // Set next flip attempt to be 4 minutes in the future. - // These depend on the assignment to flipDelayHrs above. - constexpr double delayHours = 4.0 / 60.0; - if (currentPosition.pierSide == ISD::Mount::PierSide::PIER_EAST) - setFlipDelayHrs(rangeHA(ha + 12 + delayHours) - offset); + if (getFlipDelayHrs() <= 1.0) + { + // Set next flip attempt to be 4 minutes in the future. + // These depend on the assignment to flipDelayHrs above. + constexpr double delayHours = 4.0 / 60.0; + if (currentPosition.pierSide == ISD::Mount::PierSide::PIER_EAST) + setFlipDelayHrs(rangeHA(ha + 12 + delayHours) - offset); + else + setFlipDelayHrs(ha + delayHours - offset); + + // check to stop an infinite loop, 1.0 hrs for now but should use the Ha limit + appendLogText(i18n("meridian flip failed, retrying in 4 minutes")); + } else - setFlipDelayHrs(ha + delayHours - offset); - - // check to stop an infinite loop, 1.0 hrs for now but should use the Ha limit - appendLogText(i18n("meridian flip failed, retrying in 4 minutes")); + { + appendLogText(i18n("No successful Meridian Flip done, delay too long")); + } + updateMFMountState(MOUNT_FLIP_COMPLETED); // this will resume imaging and try again after the extra delay } else { - appendLogText(i18n("No successful Meridian Flip done, delay too long")); + setFlipDelayHrs(0); + appendLogText(i18n("Meridian flip completed OK.")); + // signal that capture can resume + updateMFMountState(MOUNT_FLIP_COMPLETED); } - updateMFMountState(MOUNT_FLIP_COMPLETED); // this will resume imaging and try again after the extra delay } else - { - setFlipDelayHrs(0); - appendLogText(i18n("Meridian flip completed OK.")); - // signal that capture can resume - updateMFMountState(MOUNT_FLIP_COMPLETED); - } + qCInfo(KSTARS_EKOS_MOUNT) << "Tracking state during meridian flip reached too early, ignored."; } break; @@ -320,9 +322,9 @@ targetPosition.position.ra().toHMSString() << "DEC=" << targetPosition.position.dec().toDMSString() << " Hour Angle " << dms(HA).toHMSString(); - updateMFMountState(MeridianFlipState::MOUNT_FLIP_RUNNING); updateMinMeridianFlipEndTime(); + updateMFMountState(MeridianFlipState::MOUNT_FLIP_RUNNING); // start the re-slew to the current target expecting that the mount firmware changes the pier side emit slewTelescope(targetPosition.position); @@ -374,7 +376,7 @@ void MeridianFlipState::updateMinMeridianFlipEndTime() { - minMeridianFlipEndTime = KStarsData::Instance()->clock()->utc().addSecs(minMeridianFlipDurationSecs); + minMeridianFlipEndTime = KStarsData::Instance()->clock()->utc().addSecs(Options::minFlipDuration()); } void MeridianFlipState::updateMFMountState(MeridianFlipMountState status) @@ -473,6 +475,14 @@ m_MountStatus = status; } +void MeridianFlipState::setMountParkStatus(ISD::ParkStatus status) { + // clear the meridian flip when parking + if (status == ISD::PARK_PARKING || status == ISD::PARK_PARKED) + updateMFMountState(MOUNT_FLIP_NONE); + + m_MountParkStatus = status; +} + void MeridianFlipState::updatePosition(MountPosition &pos, const SkyPoint &position, ISD::Mount::PierSide pierSide, const dms &ha, const bool isValid) diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/manager/meridianflipstate.h kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/manager/meridianflipstate.h --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/manager/meridianflipstate.h 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/manager/meridianflipstate.h 2023-12-26 04:50:30.000000000 +0000 @@ -195,7 +195,7 @@ /** * @brief Slot for receiving an update to the mount park status */ - void setMountParkStatus(ISD::ParkStatus status) { m_MountParkStatus = status; } + void setMountParkStatus(ISD::ParkStatus status); /** * @brief Slot for receiving a new telescope position * @param position new position @@ -253,11 +253,9 @@ static void updatePosition(MountPosition &pos, const SkyPoint &position, ISD::Mount::PierSide pierSide, const dms &ha, const bool isValid); - // A meridian flip requires a slew of 180 degrees in the hour angle axis so will take at least - // the time for that, currently set to 20 seconds - // not reliable for pointing state change detection but reported if the pier side is unknown + // A meridian flip requires a slew of 180 degrees in the hour angle axis so will take a certain + // amount of time. Within this time, a slewing state change will be ignored for pier side change checks. QDateTime minMeridianFlipEndTime; - int minMeridianFlipDurationSecs = 20; double flipDelayHrs = 0.0; // delays the next flip attempt if it fails diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/opsekos.ui kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/opsekos.ui --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/ekos/opsekos.ui 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/ekos/opsekos.ui 2023-12-26 04:50:30.000000000 +0000 @@ -592,10 +592,23 @@ 3 - - + + + + Cover or uncover telescope dialog timeout in seconds + - seconds + Dialog timeout: + + + + + + + Maximum acceptable difference between requested and measured temperature set point. When the temperature threshold is below this value, the temperature set point request is deemed successful. + + + Temperature threshold: @@ -606,33 +619,30 @@ - - - - Qt::Horizontal + + + + 600 - - - 163 - 13 - + + 10 - + + 60 + + - - - - Wait this many seconds after guiding is resumed before starting capture + + + + seconds - - + + - Maximum acceptable difference between requested and measured temperature set point. When the temperature threshold is below this value, the temperature set point request is deemed successful. - - - Temperature threshold: + Wait this many seconds after guiding is resumed before starting capture @@ -662,31 +672,51 @@ - - + + + + seconds + + + + + + + Qt::Horizontal + + + + 163 + 13 + + + + + + - Cover or uncover telescope dialog timeout in seconds + <html><head/><body><p>Minimal duration of a meridian flip. Checks if the meridian fip has been completed will be postponed until the configured duration has past since the meridian flip has been started.</p></body></html> - Dialog timeout: + Minimal meridian flip duration: - - + + - 600 + 360 - 10 + 5 - 60 + 20 - - + + seconds diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/kstars.cpp kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/kstars.cpp --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/kstars.cpp 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/kstars.cpp 2023-12-26 04:50:30.000000000 +0000 @@ -596,7 +596,8 @@ return KStars::Instance()->genericFITSViewer(); else { - QSharedPointer newFITSViewer(new FITSViewer(Options::independentWindowFITS() ? nullptr : KStars::Instance())); + QSharedPointer newFITSViewer(new FITSViewer(Options::independentWindowFITS() ? nullptr : KStars::Instance()), + &QObject::deleteLater); m_FITSViewers.append(newFITSViewer); connect(newFITSViewer.get(), &FITSViewer::terminated, this, [this]() { @@ -614,7 +615,7 @@ { if (m_GenericFITSViewer.isNull()) { - m_GenericFITSViewer.reset(new FITSViewer(Options::independentWindowFITS() ? nullptr : this)); + m_GenericFITSViewer.reset(new FITSViewer(Options::independentWindowFITS() ? nullptr : this), &QObject::deleteLater); connect(m_GenericFITSViewer.get(), &FITSViewer::terminated, this, [this]() { m_FITSViewers.removeOne(m_GenericFITSViewer); diff -Nru kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/kstars.kcfg kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/kstars.kcfg --- kstars-bleeding-3.6.8+202312111812~ubuntu23.04.1/kstars/kstars.kcfg 2023-12-11 18:12:25.000000000 +0000 +++ kstars-bleeding-3.6.8+202312260450~ubuntu23.04.1/kstars/kstars.kcfg 2023-12-26 04:50:30.000000000 +0000 @@ -1917,6 +1917,10 @@ 60 + + + 20 + false