indigo-astronomy / indigo

INDIGO is a system of standards and frameworks for multiplatform and distributed astronomy software development designed to scale with your needs.
http://www.indigo-astronomy.org
Other
149 stars 67 forks source link

Mount LX200 does not detect TCP network disconnection #457

Closed je-lamiaud closed 2 years ago

je-lamiaud commented 2 years ago

Following on my previous submission about failed network connection : when the mount is now connected and a disconnection occurs, this disconnection is not handled. The commands sent to the mount end in failure, but it is not obvious to the layperson what causes these failed states on several LX200 Indigo properties.

The following patch detects the TCP disconnection when a command is attempted. Which is quite fast for the mount itself, but can be much longer if, for instance, only the focuser is opened.

indigo_mount_lx200.c.patch.txt

BTW, I disabled the Nagle algorithm on the LX200 connection, to avoid potential latency issues (LX200 commands being delayed on Indigo side).

polakovic commented 2 years ago

Thank you! Pls. can you make a pull request for your change? I'm away and can't apply your patch now :(

je-lamiaud commented 2 years ago

Thank you! Pls. can you make a pull request for your change? I'm away and can't apply your patch now :(

OK. I'm currently not completely happy with this fix, and will work further on it before creating the pull request.