Kstars feature addition - scheduled refocus during a capture sequence
ClosedPublic

Authored by mfulbright on Jul 15 2017, 1:58 PM.

Details

Reviewers
mutlaqja
Summary

This patch adds the ability to have a scheduled refocus every N minutes during a capture sequence. A timer is started when the sequence stars and after each image capture the elapsed time is compared to the requested refocus interval and an autofocus is initiated at the proper time. It should work in parallel with the existing refocus mechanism based on a HFR threshold.

Test Plan

To test this new feature simply create a capture sequence with the checkbox for the scheduled refocus checked. The length of the capture sequence needs to be longer than the requested refocus interval for the code to be triggered.

Diff Detail

Repository
R321 KStars
Lint
Lint Skipped
Unit
Unit Tests Skipped
mfulbright created this revision.Jul 15 2017, 1:58 PM
mutlaqja accepted this revision.Jul 15 2017, 2:57 PM
This revision is now accepted and ready to land.Jul 15 2017, 2:57 PM
mutlaqja requested changes to this revision.Jul 15 2017, 4:27 PM

When I ran it, the Ekos capture module stretched vertically 830 pixels, that's above the max 800 pixels limit we have (so that it appears of small screens). Looks like some GUI work needs to be done. Also, the refocus stuff in the GUI are NOT disabled by default like the others. They have to be disabled by default and only be re-enabled again if there is a focuser detected.

This revision now requires changes to proceed.Jul 15 2017, 4:27 PM

When I ran it, the Ekos capture module stretched vertically 830 pixels, that's above the max 800 pixels limit we have (so that it appears of small screens). Looks like some GUI work needs to be done. Also, the refocus stuff in the GUI are NOT disabled by default like the others. They have to be disabled by default and only be re-enabled again if there is a focuser detected.

On my Ubuntu Mate 16.04 system it is 720 pixels high - is there some sort of theme settings for KDE or Qt that might affects this on different systems?

I'll look at the default setting - I have the config Option and the checkbox off by default so that is odd.

I confirmed with no kstarsrc present the sheduled refocus checkbox is not selected by default- I'll keep playing with it to see if there is some way to trigger it on by default.

I am looking at how to make it enabled only when a focuser is connected but I'm not seeing a signal or interface in focus.cpp to do this easily. Looks like I could add a method to focus.cpp that is based on the class variable currentFocuser and can return if a valid focuser is attached or not?

Something like:

bool Focus::isfocuserConnected()
{

if (currentFocuser == nullptr)
    return false;

if (currentFocuser->isConnected() == false)
    return false;

return true;

}

It should probably be the same way Autofocus if HFR ...etc is enabled/disabled

Just built everything on a kubuntu 17.04 virtual machine and started a virgin run of Kstars. I decided working on Kstars in a KDE environment made more sense.

The height of the window is 720 pixels which confirms the results I was getting on a Ubuntu Mate 16.04.2 VM I originally developed the patch on.

The refocus option was not selected by default.

I will work on the enable/disable of the checkbox based on the availability of a focuser and resubmit the patch.

mfulbright updated this revision to Diff 16794.Jul 16 2017, 9:27 PM
mfulbright edited edge metadata.

I believe this patch is ready for reconsideration.

I have done some tests with a fresh install of Kubuntu 17.04 running the plasma KDE desktop and the size of the window seems to conform to the 800 pixel height with the default desktop settings. I was finding it coming in around 720 pixels high.

I also added a change so that the scheduled refocus option can not be selected until an autofocus has been successfully run.

mutlaqja accepted this revision.Jul 17 2017, 1:45 PM
This revision is now accepted and ready to land.Jul 17 2017, 1:45 PM
aacid closed this revision.Sep 5 2017, 8:30 PM
aacid added a subscriber: aacid.

Closing this since it already landed, please remember to close your phabricator requests when making a commit so the list of reviews that need to happen is clear.

https://community.kde.org/Policies/Commit_Policy#Special_keywords_in_GIT_and_SVN_log_messages