[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 906b6e62d8f0eb07e3df5
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-04-28 12:14:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 906b6e62d8f0eb07e3df5a029bc0f589c7eb1b1f (commit) via 4c09c2362e6d3bb8b367a5fcde920dd19d4ac198 (commit) from 2066bb38fd8b77a46526826b1be2d0f9f34ddf8e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 906b6e62d8f0eb07e3df5a029bc0f589c7eb1b1f Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Apr 28 07:03:10 2021 -0500 Update man pages diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index b8751ffd..0f74d71c 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -1037,7 +1037,15 @@ Get DTMF . .TP .BR _ ", " get_info -Get misc information about the rig (no VFO in 'VFO mode' or value is passed). +Get misc information about the rig. +. +.TP +.BR 0xf5 ", " get_rig_info +Get misc information about the rig vfo status and other info. +. +.TP +.BR 0xf3 ", " get_vfo_info " \(aq" \fIVFO\fP \(aq +Get misc information about a specific vfo. . .TP .B dump_state diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index 8024b6c1..316b2eb2 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -1017,7 +1017,15 @@ Get DTMF . .TP .BR _ ", " get_info -Get misc information about the rig (no VFO in 'VFO mode' or value is passed). +Get misc information about the rig. +. +.TP +.BR 0xf5 ", " get_rig_info " +Get misc information about the rig vfos and other info. +. +.TP +.BR 0xf3 ", " get_vfo_info " \(aq" "\fIVFO\fP" \(aq +Get misc information about a specific vfo. . .TP .B dump_state commit 4c09c2362e6d3bb8b367a5fcde920dd19d4ac198 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Apr 28 06:44:10 2021 -0500 Fix rig_get_info to return "None" for VFO if needed instead of empty string Should make parsing easier ensuring all are token pairs https://github.com/Hamlib/Hamlib/issues/682 diff --git a/src/rig.c b/src/rig.c index d8412965..aece5b8b 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6212,6 +6212,7 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) vfo_t vfoA,vfoB; freq_t freqA,freqB; rmode_t modeA,modeB; + char *modeAstr, *modeBstr; pbwidth_t widthA,widthB; split_t split; int satmode; @@ -6236,11 +6237,15 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) rig_get_cache(rig, vfoB, &freqB, &cache_ms_freq, &modeB, &cache_ms_mode, &widthB, &cache_ms_width); } + modeAstr = (char*)rig_strrmode(modeA); + modeBstr = (char*)rig_strrmode(modeB); + if (modeAstr[0]==0) modeAstr="None"; + if (modeBstr[0]==0) modeBstr="None"; rxa = 1; txa = split == 0; rxb = !rxa; txb = split == 1; - snprintf(response,max_response_len,"VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d", rig_strvfo(vfoA), freqA, rig_strrmode(modeA), (int)widthA, rxa, txa, rig_strvfo(vfoB), freqB, rig_strrmode(modeB), (int)widthB, rxb, txb, split, satmode); + snprintf(response,max_response_len,"VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d", rig_strvfo(vfoA), freqA, modeAstr, (int)widthA, rxa, txa, rig_strvfo(vfoB), freqB, modeBstr, (int)widthB, rxb, txb, split, satmode); RETURNFUNC(RIG_OK); } ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctl.1 | 10 +++++++++- doc/man1/rigctld.1 | 10 +++++++++- src/rig.c | 7 ++++++- 3 files changed, 24 insertions(+), 3 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |