Do not abort PHD2 guiding while suspended

Authored by wreissenberger on Jun 19 2019, 7:54 PM.

Description

Do not abort PHD2 guiding while suspended

Summary:
There is a special case where the Capture and the Guide module get out of sync. As a result, PHD2 remains suspended while the Capture module continues capturing.

This happens, when a "star lost" event happens short before the Capture module issues a re-focussing. If the "star lost" timeout happens during the re-focussing, the Guiding module sends an "abort" to PHD2 while PHD2 is suspended. When the focussing succeeds, the Capture module sends a "resume()" event to the Guiding module. Here is where the problem comes: since PHD2 has its guiding aborted, it will remain in the "suspend" state and will not continue guiding.

This fix changes the behaviour of the PHD2 module. As soon as the PHD2 module receives a "suspend", it stops the "star lost" timer and restarts it as soon as the "resume" event is received.

Test Plan:
The setup to reproduce this is quite tricky:

  • Trigger a star lost event - this can be done by drastically reducing the imaging time of PHD2, e.g. to 0.05s
  • Trigger a re-focus - e.g. by setting the re-focus time in Capture to 1min
  • Ensure, that the "star lost" event happens before the Capture issues a re-focussing: start a schedule with a capture sequence with more than one frame of the same filter (otherwise the re-focus event never occurs). Reduce the imaging time of PHD2 shortly before the re-focus event is triggered
  • Ensure, that the "star lost" timeout happens before re-focussing is completed. You can set the timeout in the Options dialog of the Capture module (bottom right) and set it e.g. to 20 seconds

Reviewers: mutlaqja, TallFurryMan

Reviewed By: mutlaqja

Differential Revision: https://phabricator.kde.org/D21914

Details

Committed
mutlaqjaJun 19 2019, 7:55 PM
Reviewer
mutlaqja
Differential Revision
D21914: Do not abort PHD2 guiding while suspended
Parents
R321:21d482cce18c: Fix minor typos
Branches
Unknown
Tags
Unknown