Do not abort PHD2 guiding while suspended
ClosedPublic

Authored by wreissenberger on Jun 19 2019, 6:34 PM.

Details

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

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wreissenberger requested review of this revision.Jun 19 2019, 6:34 PM
wreissenberger created this revision.
mutlaqja accepted this revision.Jun 19 2019, 7:54 PM
This revision is now accepted and ready to land.Jun 19 2019, 7:54 PM
This revision was automatically updated to reflect the committed changes.
Restricted Application added a project: KDE Edu. · View Herald TranscriptJun 19 2019, 7:55 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript