[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 29c57bc5a7d8caa2a2c8d
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-12-17 22:51: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 29c57bc5a7d8caa2a2c8d2a39f75e98accd34232 (commit) via 0242df5098d3e3efc1c00cd4bbe7fa873c887ee2 (commit) via cb7f5ca120298328a82eff1ac6297a9e7e366258 (commit) from 263f1cde72081e4e6bdf1c02eca5253a9445fe99 (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 29c57bc5a7d8caa2a2c8d2a39f75e98accd34232 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 17 16:51:19 2020 -0600 Add powermeter_scale to flrig diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index a6ce6d93..668fd5ef 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -1923,7 +1923,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) char value[MAXARGLEN]; char *cmd; int retval; - //struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv; + struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv; rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo)); @@ -1964,12 +1964,12 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) rig_debug(RIG_DEBUG_TRACE, "%s: val.i='%s'(%d)\n", __func__, value, val->i); case RIG_LEVEL_RFPOWER_METER: - val->f = atof(value) / 100.0; + val->f = atof(value) / 100.0 * priv->powermeter_scale; rig_debug(RIG_DEBUG_TRACE, "%s: val.f='%s'(%g)\n", __func__, value, val->f); break; case RIG_LEVEL_RFPOWER_METER_WATTS: - val->f = atof(value); + val->f = atof(value) * priv->powermeter_scale; rig_debug(RIG_DEBUG_TRACE, "%s: val.f='%s'(%g)\n", __func__, value, val->f); break; diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index 5eac365b..ad0e0f74 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201216" +#define BACKEND_VER "20201217" #define EOM "\r" #define TRUE 1 commit 0242df5098d3e3efc1c00cd4bbe7fa873c887ee2 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 17 16:37:53 2020 -0600 Fix RIG_LEVEL_RFPOWER_METER_WATTS for flrig #2 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 2934b9c2..a6ce6d93 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -1939,6 +1939,7 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) case RIG_LEVEL_STRENGTH: cmd = "rig.get_power"; break; + case RIG_LEVEL_RFPOWER_METER_WATTS: case RIG_LEVEL_RFPOWER_METER: cmd = "rig.get_pwrmeter"; break; default: commit cb7f5ca120298328a82eff1ac6297a9e7e366258 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Dec 17 16:16:45 2020 -0600 Fix RIG_LEVEL_RFPOWER_METER_WATTS for flrig diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 3b38a0b2..2934b9c2 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -57,7 +57,7 @@ RIG_MODE_SSB | RIG_MODE_LSB | RIG_MODE_USB |\ RIG_MODE_FM | RIG_MODE_WFM | RIG_MODE_FMN |RIG_MODE_PKTFM ) -#define FLRIG_LEVELS (RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_MICGAIN | RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER_METER) +#define FLRIG_LEVELS (RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_MICGAIN | RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER_METER | RIG_LEVEL_RFPOWER_METER_WATTS) #define streq(s1,s2) (strcmp(s1,s2)==0) ----------------------------------------------------------------------- Summary of changes: rigs/dummy/flrig.c | 9 +++++---- rigs/dummy/flrig.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |