From 2cec9e6d5725e73637d658648180413e9fc15137 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Fri, 27 Jan 2023 23:49:47 -0600 Subject: [PATCH] Update rigctlsync --- doc/man1/rigctlsync.1 | 2 +- tests/rigctlsync.c | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/doc/man1/rigctlsync.1 b/doc/man1/rigctlsync.1 index 9a9f619e3..369950ad6 100644 --- a/doc/man1/rigctlsync.1 +++ b/doc/man1/rigctlsync.1 @@ -264,7 +264,7 @@ with FLRig as the Hamlib model .PP .in +4n .EX -.RB $ " rigctlsync -m 4 -M 9" +.RB $ " rigctlsync -m 4 -M 9 -R 192.168.1.1:4532" .EE .in . diff --git a/tests/rigctlsync.c b/tests/rigctlsync.c index 63aa7c3c4..0499d2fb2 100644 --- a/tests/rigctlsync.c +++ b/tests/rigctlsync.c @@ -211,7 +211,7 @@ int main(int argc, char *argv[]) int show_conf = 0; int dump_caps_opt = 0; - const char *rig_file = NULL, *rig_file2 = NULL; + const char *rig_file = NULL, *rig_file2 = "127.0.0.1:4532"; //const char **ptt_file = NULL, *dcd_file = NULL; //ptt_type_t ptt_type = RIG_PTT_NONE; //dcd_type_t dcd_type = RIG_DCD_NONE; @@ -220,7 +220,7 @@ int main(int argc, char *argv[]) char *civaddr = NULL; /* NULL means no need to set conf */ char conf_parms[MAXCONFLEN] = ""; - printf("rigctlcom Version 1.4\n"); + printf("rigctlsync Version 1.0\n"); if (argc < 3) { @@ -494,7 +494,7 @@ int main(int argc, char *argv[]) rig_set_debug(verbose); - rig_debug(RIG_DEBUG_VERBOSE, "%s, %s\n", "rigctlcom", hamlib_version2); + rig_debug(RIG_DEBUG_VERBOSE, "%s, %s\n", "rigctlsync", hamlib_version2); rig_debug(RIG_DEBUG_VERBOSE, "%s", "Report bugs to \n\n"); @@ -550,12 +550,7 @@ int main(int argc, char *argv[]) strncpy(my_rig->state.rigport.pathname, rig_file, HAMLIB_FILPATHLEN - 1); } - if (!rig_file2) - { - fprintf(stderr, "-R com port not provided\n"); - exit(2); - } - + fprintf(stderr, "rig to send frequency to: %s\n", rig_file2); strncpy(my_rig_sync->state.rigport.pathname, rig_file2, HAMLIB_FILPATHLEN - 1); #if 0 @@ -691,7 +686,7 @@ void usage() name); printf("Example: Sync freq from rigctld to SDR#\n"); - printf("\t%s -m 2 -M 9 127.0.0.1:4532\n\n", name); + printf("\t%s -m 2 -M 9 -R 127.0.0.1:4532\n\n", name); printf("See the %s.1 manual page for complete details.\n\n", name); printf(