diff --git a/doc/man1/rotctl.1 b/doc/man1/rotctl.1 index 83175119c..7da2249d4 100644 --- a/doc/man1/rotctl.1 +++ b/doc/man1/rotctl.1 @@ -5,7 +5,7 @@ .\" .\" Note: Please keep this page in sync with the source, rotctl.c .\" -.TH ROTCTL "1" "2020-09-09" "Hamlib" "Hamlib Utilities" +.TH ROTCTL "1" "2025-09-01" "Hamlib" "Hamlib Utilities" . . .SH NAME @@ -805,6 +805,38 @@ TCP port, and querying the position: .EE .in . +.PP +Start +.B rotctl +for INDI using an address other than the default \fIlocalhost:5764\fP: +. +.PP +.in +4n +.EX +.RB $ " rotctl -m 2001 -r example.com:12345" +.EE +.in +. +.PP +Start +.B rotctl +for INDI using the local domain on Linux: +. +.PP +.in +4n +.EX +.RB $ " rotctl -m 2001 -r @/tmp/indiserver" +.EE +.in +.PP +INDI (Instrument Neutral Distributed Interface) is an LGPLv2 +software to control astronomical equipment, +including telescope mounts that can be used to rotate antennas. +.PP +For more information see +.UR https://indilib.org/ +indilib.org +.UE . .SH BUGS . diff --git a/rotators/indi/indi.c b/rotators/indi/indi.c index e40538248..39ec6411c 100644 --- a/rotators/indi/indi.c +++ b/rotators/indi/indi.c @@ -30,7 +30,7 @@ const struct rot_caps indi_rot_caps = ROT_MODEL(ROT_MODEL_INDI), .model_name = "INDI", .mfg_name = "INDI", - .version = "0.1", + .version = "0.2", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rot_type = ROT_TYPE_OTHER, diff --git a/rotators/indi/indi_wrapper.cpp b/rotators/indi/indi_wrapper.cpp index 0ae8f1758..0861fd7d0 100644 --- a/rotators/indi/indi_wrapper.cpp +++ b/rotators/indi/indi_wrapper.cpp @@ -597,9 +597,20 @@ extern "C" const char *indi_wrapper_get_info(ROT *rot) extern "C" int indi_wrapper_open(ROT *rot) { + hamlib_port_t *rotp = ROTPORT(rot); + char host[256]; + char port[6]; + rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); - indi_wrapper_client->setServer("localhost", 7624); + if (parse_hoststr(rotp->pathname, strlen(rotp->pathname), host, port) == RIG_OK) + { + indi_wrapper_client->setServer(host, atoi(port)); + } + else + { + indi_wrapper_client->setServer("localhost", 7624); + } if (!indi_wrapper_client->connectServer()) { diff --git a/rotators/indi/indi_wrapper.hpp b/rotators/indi/indi_wrapper.hpp index c96bf277c..69b90b32f 100644 --- a/rotators/indi/indi_wrapper.hpp +++ b/rotators/indi/indi_wrapper.hpp @@ -26,6 +26,7 @@ #include #include +#include "misc.h" class RotINDIClient : public INDI::BaseClient {