OpenPHDGuiding / phd2

PHD2 Guiding
https://openphdguiding.org
BSD 3-Clause "New" or "Revised" License
244 stars 111 forks source link

Update INDI device's Connect method to wait for 'Connected' property #1176

Closed nrackwit closed 4 months ago

nrackwit commented 4 months ago

This push attempts to fix "Problem with connection status when connecting Indi devices in v2.6.13dev1 [#1174 ]"

This new code monitors the INDI device's 'Connected' property and waits for it to be 'true' before releasing the Connect method back to the UI. I tried to move the wait loop into the RunInBG template so users are able to cancel.

It's been tested with an aarch64 bit build using the Indi scope and camera simulators. I verified that

Concerns or advise is welcome. I am not overly familiar with the overall device management code base so there is a good chance that this change is overlooking something or not following best practices - let me know!

A debug log for the test is attached: PHD2.log

agalasso commented 4 months ago

@nrackwit thanks for the PR! It looks like the intended commits somehow did not make it into the pr's branch?

nrackwit commented 4 months ago

Hum, dang, thanks for the heads-up. I thought that I can create different pull requests from the same updated branch, but reading up on it, it seems I can't. Let me create a new pr with everything copied over and close this one.

https://github.com/OpenPHDGuiding/phd2/pull/1177

nrackwit commented 4 months ago

Closing this one.