This differential relates to tests and code structure for the Focus module.
Tests show that:
- There is no way to determine when the star detection procedure is done. The capture button should re-enable when everything is finished.
- The CCD Simulator needs improvement for some detection mechanisms to work properly.
- It is difficult to create fixtures with deterministic verifications, although better controlling the simulation time should help.
- Syncing the mount to object coordinates is a good idea to speed up tests.
- When not tracking, the CCD Simulator doesn't render trails, it could be a nice improvement.
- Because kstars_ui_tests is becoming larger, it needs to be divided into multiple smaller tests for efficiency.
- QTest, because failing a test means returning from the test function, is macro hell.
- QComboBox is difficult to control programmatically because of its internal signal management.
We then refactor star detection for clarity and consistency in Focus and attempt to reduce side-effects in FITSData:
- Make FITSData buffer read-only, except for DarkLibrary.
- Move Threshold, Gradient and Centroid detections out of FITSData.
- Move SEP detection out of FITSData.
- Docs, copyrights and adjustments.
- Removing expected failure on Gradient/Threshold.
- Adjust KTRY_EKOS_CLICK to use KTRY_EKOS_GADGET.
- Extract star search block to simplify setCaptureComplete.
- Reset KStars time after starting Ekos.
- Fix object fixture builder.
- Slight delay to overcome the weird toggling of the capture button.
- Separate/simplify annulus and threshold tests.
- Delay target chip retrieval when capture is complete.
- Test frame average, extract code averaging HFRs.