From: Nate B. <n0...@us...> - 2017-03-31 22:05:40
|
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 f7462950985155b272037f48359d4f21ad452c19 (commit) via 2d6bb183f27cf0e75f1aba6160cc54c938b322cf (commit) from a49122cf657e986d9d9ab1025ad3fcb1b122d54e (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 f7462950985155b272037f48359d4f21ad452c19 Merge: a49122c 2d6bb18 Author: Nate Bargmann <n0...@n0...> Date: Fri Mar 31 16:58:06 2017 -0500 Merge branch 'netrig-level-emulation-setup' of git://git.code.sf.net/u/bsomervi/hamlib into netrig-level-emulation-setup commit 2d6bb183f27cf0e75f1aba6160cc54c938b322cf Author: Bill Somerville <bi...@cl...> Date: Fri Mar 31 18:17:16 2017 +0100 Allow RIG_LEVEL_STRENGTH queries over the network link The rig frontend may be able to emulate RIG_LEVEL_STRENGTH by using RIG_LEVEL_RAWSTR and an S-meter calibration curve. The netrig client doesn't know this so it must pass STRENGTH queries regardless if it knows a RIG_LEVEL_RAWSTR query is allowed. If the server cannot oblige it will return a -RIG_EINVAL error which should be fine. diff --git a/dummy/netrigctl.c b/dummy/netrigctl.c index f7928ce..c3acbbc 100644 --- a/dummy/netrigctl.c +++ b/dummy/netrigctl.c @@ -235,6 +235,13 @@ chan_t chan_list[CHANLSTSIZ]; /*!< Channel list, zero ended */ return (ret < 0) ? ret : -RIG_EPROTO; rs->has_get_level = strtol(buf, NULL, 0); + if (rs->has_get_level & RIG_LEVEL_RAWSTR) + { + /* include STRENGTH because the remote rig may be able to + provide a front end emulation, if it can't then an + -RIG_EINVAL will be returned */ + rs->has_get_level |= RIG_LEVEL_STRENGTH; + } ret = read_string(&rig->state.rigport, buf, BUF_MAX, "\n", sizeof("\n")); if (ret <= 0) ----------------------------------------------------------------------- Summary of changes: dummy/netrigctl.c | 7 +++++++ 1 file changed, 7 insertions(+) hooks/post-receive -- Hamlib -- Ham radio control libraries |