Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back rig_get_vfo_list logic for new enough Hamlib installs #429

Closed
wants to merge 6 commits into from

Conversation

tmiw
Copy link
Collaborator

@tmiw tmiw commented Jun 11, 2023

Brings back previous rig_get_vfo_list logic for new enough Hamlib installations (context for why it was removed before).

@mdblack98
Copy link

Have you also added the chk_vfo to use the --set-vfo option in rigctld?
Running rigctld with --set-vfo 1 allows targetable rigs to avoid VFO swapping to get VFOB info.

@tmiw
Copy link
Collaborator Author

tmiw commented Jun 11, 2023

Doesn't look like that's an option in rigctld unless I'm missing something?

Usage: rigctld [OPTION]...
Daemon serving COMMANDs to a connected radio transceiver or receiver.

  -m, --model=ID                select radio model number. See model list
  -r, --rig-file=DEVICE         set device of the radio to operate on
  -p, --ptt-file=DEVICE         set device of the PTT device to operate on
  -d, --dcd-file=DEVICE         set device of the DCD device to operate on
  -P, --ptt-type=TYPE           set type of the PTT device to operate on
  -D, --dcd-type=TYPE           set type of the DCD device to operate on
  -s, --serial-speed=BAUD       set serial speed of the serial port
  -c, --civaddr=ID              set CI-V address, decimal (for Icom rigs only)
  -t, --port=NUM                set TCP listening port, default 4532
  -S, --separator=CHAR          set char as rigctld response separator, default is \n
  -T, --listen-addr=IPADDR      set listening IP address, default ANY
  -C, --set-conf=PARM=VAL       set config parameters
  -L, --show-conf               list all config parameters
  -l, --list                    list all model numbers and exit
  -u, --dump-caps               dump capabilities and exit
  -o, --vfo                     do not default to VFO_CURR, require extra vfo arg
  -v, --verbose                 set verbose mode, cumulative (-v to -vvvvv)
  -W, --twiddle_timeout         timeout after detecting vfo manual change
  -w, --twiddle_rit             suppress VFOB getfreq so RIT can be twiddled
  -x, --uplink                  set uplink get_freq ignore, 1=Sub, 2=Main
  -Z, --debug-time-stamps       enable time stamps for debug messages
  -M, --multicast-addr=addr     set multicast UDP address, default 0.0.0.0 (off), recommend 224.0.1.1
  -n, --multicast-port=port     set multicast UDP port, default 4532
  -A, --password                set password for rigctld access
  -R, --rigctld-idle            make rigctld close the rig when no clients are connected
  -h, --help                    display this help and exit
  -V, --version                 output version information and exit

@mdblack98
Copy link

mdblack98 commented Jun 11, 2023 via email

@tmiw
Copy link
Collaborator Author

tmiw commented Jun 11, 2023

Hmm, I looked in tests/rigctld.c on hamlib 8e94bc63d0888fc70b551bf0e76d56c9c3ba5760 and found this:

/*
 * Reminder: when adding long options,
 *      keep up to date SHORT_OPTIONS, usage()'s output and man page. thanks.
 * TODO: add an option to read from a file
 */
#define SHORT_OPTIONS "m:r:p:d:P:D:s:S:c:T:t:C:W:w:x:z:lLuovhVZMRA:n:"
static struct option long_options[] =
{
    {"model",           1, 0, 'm'},
    {"rig-file",        1, 0, 'r'},
    {"ptt-file",        1, 0, 'p'},
    {"dcd-file",        1, 0, 'd'},
    {"ptt-type",        1, 0, 'P'},
    {"dcd-type",        1, 0, 'D'},
    {"serial-speed",    1, 0, 's'},
    {"separator",       1, 0, 'S'},
    {"civaddr",         1, 0, 'c'},
    {"listen-addr",     1, 0, 'T'},
    {"port",            1, 0, 't'},
    {"set-conf",        1, 0, 'C'},
    {"list",            0, 0, 'l'},
    {"show-conf",       0, 0, 'L'},
    {"dump-caps",       0, 0, 'u'},
    {"vfo",             0, 0, 'o'},
    {"verbose",         0, 0, 'v'},
    {"help",            0, 0, 'h'},
    {"version",         0, 0, 'V'},
    {"twiddle_timeout", 1, 0, 'W'},
    {"twiddle_rit",     1, 0, 'w'},
    {"uplink",          1, 0, 'x'},
    {"debug-time-stamps", 0, 0, 'Z'},
    {"multicast-addr",  1, 0, 'M'},
    {"multicast-port",  1, 0, 'n'},
    {"password",        1, 0, 'A'},
    {"rigctld-idle",    0, 0, 'R'},
    {0, 0, 0, 0}
};

It doesn't look like that option is there? Is it something that can be passed into "set-conf" instead?

@mdblack98
Copy link

mdblack98 commented Jun 11, 2023 via email

@Tyrbiter
Copy link

I just added it to the help list.

This change is to rigctl_parse.c, how does that interact with rigctl.c and rigctld.c ? Is the command assessed by the parse routine and then passed to the actual rigctl code?

@mdblack98
Copy link

Works the same with either one
rigctl
Rig command: \get_vfo_list
VFOs: VFOA VFOB VMEM
Rig command: q\

rigctl -m 2
Rig command: \get_vfo_list
VFOs: VFOA VFOB MEM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants