Bug 422939

Summary: EKOS - If PHD2 connects first, driver configuration is not loaded
Product: [Applications] kstars Reporter: TallFurryMan <eric.dejouhanet>
Component: generalAssignee: TallFurryMan <eric.dejouhanet>
Status: CONFIRMED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description TallFurryMan 2020-06-13 22:19:06 UTC
SUMMARY


STEPS TO REPRODUCE
1. Launch indiserver with Telescope and CCD Simulator, PHD2 guider
2. Launch PHD2, connect to devices
3. Start Ekos, connect to indiserver

OBSERVED RESULT

PHD2 connects before Ekos at step 2. Configuration for the mount is not loaded,
specifically geographical location.
When Ekos connects, it also connects to PHD2 and asks for equipment to be connected. Device configuration is not loaded, geographical location remains
unconfigured, and horizon safety limits are broken as geographical location is on the equator, and park position at NCP is now at altitude zero.

EXPECTED RESULT

Not sure. Obviously configuration should be loaded when the first client
connects. But Ekos could override and force-load configuration? In that case,
PHD2 should NOT be connected before Ekos, which means it should probably be
Ekos which launches PHD2 by itself.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu 18.04 i386
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.12.5

ADDITIONAL INFORMATION
Comment 1 TallFurryMan 2020-08-24 06:45:30 UTC
There's nothing much we can do.

If connected through Ekos, the Mount Driver will already be connected when PHD2 is asked to connect. If not, then it is up to the end-user to load the configuration properly. It is sufficient to load the configuration once at the beginning of the lifecycle of the mount driver.

The remaining issue related to this problem is that Ekos will not close the connection properly when (1) crashing and (2) KStars exiting with Ekos still running.