[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 4eef84ef47874e47f567d
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-12-13 15:55:10
|
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 4eef84ef47874e47f567d0d5c88fd093977b70dc (commit) via f54d0508fd1230c3bcd85143ba7b9349eda5a2aa (commit) via 9b98a264abf06b7e847ba45511494031f851a4f2 (commit) via 5883897656f7c8937d81af112ea7d9f7792e89f2 (commit) via cdeacfb7d1015850444d329a0ee9304e265a75f5 (commit) via ddb38db106519d801ff8f6a0d3bf25fedbd50b78 (commit) via 9bc98c9a2e45dbe2c47db488be5703dc2b0fc00d (commit) via 7cd09fdd84f70598fffb684e74ab4e24408da13b (commit) via 3061a5f8b2354b14e226fc1cddcbaffce3bde159 (commit) via 0fa00cb14f12600c9863ab9369e5eb510108a252 (commit) via 915666add2c857c2c74cf4623992c419c27812ad (commit) via e4e88b833d1877797e56726a749e3bf6cdb35a05 (commit) via f22d4a6dbe7305b3a84546faa6e462e388a0d3ee (commit) via c0743dfe6e6633151b87cdbc5c7321bd11ce9d1a (commit) via 2ff3fa0782377eed7b9b766caaf41d99c434cc22 (commit) via e1aa80599f419025e1894a449ab18924817ebe9f (commit) via ffe7184970ccfde09e85db02d7d7bad743ee54a1 (commit) via 44baf44dccd86467f7aa6b529fcfefeb3501595c (commit) via 5a86a1657fe50d96b2fed22cffeb8ba61c887c64 (commit) via 7911fd1d4bd04df0a1d9d737b4817653feca75b2 (commit) via ff17dd0199f6613549f74cb8cb3351b708338a4a (commit) via d1ea35c93e0d4c7313b31415d456befdf90ad7bb (commit) via 354cb925ccf1df37d2bde19d4d81dea25e6953e5 (commit) via 97a28ea75f04fb504394565d033d6b895bc10235 (commit) via 09da908bb393b7d45e9e7d4654289a40eee4ecf5 (commit) via 0a7c229f068daaf1d1be93f7410f06f8c7f71bd2 (commit) via f60f9e0181b4926729c7fbb88571152843440120 (commit) from 9fa31392b059e4eaadad9e9d62aaa70c32869f28 (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 4eef84ef47874e47f567d0d5c88fd093977b70dc Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Dec 13 09:40:52 2020 -0600 Change newcat.c to not abort when ?; is received FTDX3000 was giving ?; to FB; command!!! https://github.com/Hamlib/Hamlib/issues/464 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 08d98313..b15f6f68 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -9032,10 +9032,12 @@ int newcat_get_cmd(RIG *rig) * There are many more cases like these and they vary by rig model. * * So far, "rig busy" type situations with the ? response have not been observed for get commands. + * Followup 20201213 FTDX3000 FB; command returning ?; so do NOT abort + * see https://github.com/Hamlib/Hamlib/issues/464 */ rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig: '%s'\n", __func__, priv->cmd_str); - return -RIG_ERJCTED; + // return -RIG_ERJCTED; } continue; diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 6b8e76e6..6b69bf15 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201212" +#define NEWCAT_VER "20201213" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit f54d0508fd1230c3bcd85143ba7b9349eda5a2aa Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Dec 13 08:55:50 2020 -0600 Added flrig LEVEL values STRENGTH, RF, AF, RFPOWER_METER, MICGAIN https://github.com/Hamlib/Hamlib/issues/460 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index caec2721..214174df 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) +#define FLRIG_LEVELS (RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_MICGAIN | RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER_METER) #define streq(s1,s2) (strcmp(s1,s2)==0) @@ -1874,7 +1874,8 @@ static int flrig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) } sprintf(cmd_arg, - "<params><param><value><double>%d</double></value></param></params>", (int)val.f); + "<params><param><value><double>%d</double></value></param></params>", + (int)val.f); switch (level) { @@ -1923,6 +1924,8 @@ 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: cmd = "rig.get_pwrmeter"; break; + default: rig_debug(RIG_DEBUG_ERR, "%s: unknown level=%d\n", __func__, (int)level); return -RIG_EINVAL; @@ -1937,9 +1940,20 @@ static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return retval; } - val->f = atof(value); + // most levels are 0-100 -- may have to allow for different ranges + switch (level) + { + case RIG_LEVEL_STRENGTH: + case RIG_LEVEL_RFPOWER_METER: + val->i = atoi(value); + rig_debug(RIG_DEBUG_TRACE, "%s: val.i='%s'(%d)\n", __func__, value, val->i); + break; + + default: + val->f = atof(value) / 100; + rig_debug(RIG_DEBUG_TRACE, "%s: val.f='%s'(%f)\n", __func__, value, val->f); + } - rig_debug(RIG_DEBUG_TRACE, "%s: val='%s'(%f)\n", __func__, value, val->f); return RIG_OK; } diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index f49a1934..b231e02d 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201209" +#define BACKEND_VER "20201213" #define EOM "\r" #define TRUE 1 commit 9b98a264abf06b7e847ba45511494031f851a4f2 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Dec 13 00:01:09 2020 -0600 Fix datamode set in icom.c to use 0x00 0x00 per the manual for 7300 and 9700 https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 1248b87b..1c13b4a2 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1627,7 +1627,6 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, datamode[0] = 0x00; break; } - if (width != RIG_PASSBAND_NOCHANGE) { if (filter_byte) // then we need the width byte too @@ -1638,7 +1637,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, // since width_icom is 0-2 for rigs that need this here we have to make it 1-3 datamode[1] = datamode[0] ? width_icom : 0; retval = - icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, width_icom == -1 ? 1 : 2, + icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 2, ackbuf, &ack_len); } commit 5883897656f7c8937d81af112ea7d9f7792e89f2 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 23:05:59 2020 -0600 icom.c passband nochange seems to be working https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index ec5e20e3..e52950ad 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -404,7 +404,6 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, "%s: Failed to get width for passband nochange err=%s\n", __func__, rigerror(ret)); } - return RIG_OK; } switch (mode) @@ -491,15 +490,15 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, icmode_ext = PD_WIDE_3; /* default to Wide */ } } + *pd = icmode_ext; } else { // filter should already be set elsewhere - icmode_ext = priv_data->filter; + *pd = priv_data->filter; } *md = icmode; - *pd = icmode_ext; return RIG_OK; } diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index d4b66816..1248b87b 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1604,6 +1604,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, break; } + rig_debug(RIG_DEBUG_VERBOSE, "%s mode=%d, width=%d\n", __func__, (int)icom_mode, (int)width); retval = icom_set_mode(rig, vfo, icom_mode, width); if (RIG_OK == retval) @@ -1704,16 +1705,18 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { err = rig2icom_mode(rig, vfo, mode, width, &icmode, &icmode_ext); } + if (width == RIG_PASSBAND_NOCHANGE) icmode_ext = priv_data->filter; if (err < 0) { + rig_debug(RIG_DEBUG_ERR, "%s: Error on rig2icom err=%d\n", __func__, err); return err; } + rig_debug(RIG_DEBUG_VERBOSE, "%s: icmode=%d, icmode_ext=%d\n", __func__, icmode, icmode_ext); /* IC-731, IC-735, IC-7000 don't support passband data */ /* IC-726 & IC-475A/E also limited support - only on CW */ /* TODO: G4WJS CW wide/narrow are possible with above two radios */ - if (icmode_ext == -1) icmode_ext = priv_data->filter; if (priv->civ_731_mode || rig->caps->rig_model == RIG_MODEL_OS456 || rig->caps->rig_model == RIG_MODEL_IC726 || rig->caps->rig_model == RIG_MODEL_IC475 @@ -1722,6 +1725,7 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) icmode_ext = -1; } + rig_debug(RIG_DEBUG_VERBOSE, "%s: #2 icmode=%d, icmode_ext=%d\n", __func__, icmode, icmode_ext); retval = icom_transaction(rig, C_SET_MODE, icmode, (unsigned char *) &icmode_ext, (icmode_ext == -1 ? 0 : 1), ackbuf, &ack_len); @@ -1771,6 +1775,7 @@ int icom_get_mode_with_data(RIG *rig, vfo_t vfo, rmode_t *mode, rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); retval = icom_get_mode(rig, vfo, mode, width); + rig_debug(RIG_DEBUG_VERBOSE, "%s mode=%d\n", __func__, (int)*mode); if (retval != RIG_OK) { return retval; @@ -1816,6 +1821,7 @@ int icom_get_mode_with_data(RIG *rig, vfo_t vfo, rmode_t *mode, return -RIG_ERJCTED; } + rig_debug(RIG_DEBUG_VERBOSE, "%s databuf[2]=%d, mode=%d\n", __func__, (int)databuf[2], (int)*mode); if (databuf[2]) /* 0x01/0x02/0x03 -> data mode, 0x00 -> not data mode */ { switch (*mode) @@ -2045,8 +2051,6 @@ int icom_set_vfo(RIG *rig, vfo_t vfo) return -RIG_EINVAL; } - rig_debug(RIG_DEBUG_TRACE, "%s: debug#1\n", __func__); - if (vfo != rig->state.current_vfo) { rig_debug(RIG_DEBUG_TRACE, "%s: VFO changing from %s to %s\n", __func__, commit cdeacfb7d1015850444d329a0ee9304e265a75f5 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 15:38:42 2020 -0600 move icom.c icmode_ext setting a bit earlier in the code https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 9555338d..d4b66816 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1713,6 +1713,7 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) /* IC-731, IC-735, IC-7000 don't support passband data */ /* IC-726 & IC-475A/E also limited support - only on CW */ /* TODO: G4WJS CW wide/narrow are possible with above two radios */ + if (icmode_ext == -1) icmode_ext = priv_data->filter; if (priv->civ_731_mode || rig->caps->rig_model == RIG_MODEL_OS456 || rig->caps->rig_model == RIG_MODEL_IC726 || rig->caps->rig_model == RIG_MODEL_IC475 @@ -1721,7 +1722,6 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) icmode_ext = -1; } - if (icmode_ext == -1) icmode_ext = priv_data->filter; retval = icom_transaction(rig, C_SET_MODE, icmode, (unsigned char *) &icmode_ext, (icmode_ext == -1 ? 0 : 1), ackbuf, &ack_len); commit ddb38db106519d801ff8f6a0d3bf25fedbd50b78 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 15:33:38 2020 -0600 Set icom_set_mode to use existing filter for passband nochange https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 74ddda8e..9555338d 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1681,6 +1681,7 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { struct icom_priv_data *priv; const struct icom_priv_caps *priv_caps; + const struct icom_priv_data *priv_data; struct rig_state *rs; unsigned char ackbuf[MAXFRAMELEN]; unsigned char icmode; @@ -1693,6 +1694,7 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) priv = (struct icom_priv_data *) rs->priv; priv_caps = (const struct icom_priv_caps *) rig->caps->priv; + priv_data = (const struct icom_priv_data *) rig->state.priv; if (priv_caps->r2i_mode != NULL) /* call priv code if defined */ { @@ -1719,6 +1721,7 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) icmode_ext = -1; } + if (icmode_ext == -1) icmode_ext = priv_data->filter; retval = icom_transaction(rig, C_SET_MODE, icmode, (unsigned char *) &icmode_ext, (icmode_ext == -1 ? 0 : 1), ackbuf, &ack_len); commit 9bc98c9a2e45dbe2c47db488be5703dc2b0fc00d Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 13:22:49 2020 -0600 Add filter memory to frame.c for no passband change https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index 5348dbca..ec5e20e3 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -389,6 +389,7 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, unsigned char icmode; signed char icmode_ext; pbwidth_t width_tmp = width; + struct icom_priv_data *priv_data = (struct icom_priv_data *) rig->state.priv; icmode_ext = -1; @@ -491,6 +492,11 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, } } } + else + { + // filter should already be set elsewhere + icmode_ext = priv_data->filter; + } *md = icmode; *pd = icmode_ext; commit 7cd09fdd84f70598fffb684e74ab4e24408da13b Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 13:00:26 2020 -0600 Fix passband nochange in icom frame.c https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index ca718a8d..5348dbca 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -388,6 +388,7 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, { unsigned char icmode; signed char icmode_ext; + pbwidth_t width_tmp = width; icmode_ext = -1; @@ -402,6 +403,7 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, "%s: Failed to get width for passband nochange err=%s\n", __func__, rigerror(ret)); } + return RIG_OK; } switch (mode) @@ -458,7 +460,7 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, return -RIG_EINVAL; } - if (width != RIG_PASSBAND_NOCHANGE) + if (width_tmp != RIG_PASSBAND_NOCHANGE) { pbwidth_t medium_width = rig_passband_normal(rig, mode); commit 3061a5f8b2354b14e226fc1cddcbaffce3bde159 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 12:40:04 2020 -0600 Fix icom filter value, not ASCII!!! https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 0e32beca..74ddda8e 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1868,7 +1868,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) if (mode_len == 3) { - priv_data->filter = modebuf[2] - '0'; + priv_data->filter = modebuf[2]; rig_debug(RIG_DEBUG_TRACE, "%s: modebuf[0]=0x%02x, modebuf[1]=0x%02x, modebuf[2]=0x%02x, mode_len=%d, filter=%d\n", __func__, modebuf[0], diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 9120c364..b93aab6c 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -203,7 +203,7 @@ struct icom_priv_data int x25cmdfails; // This will get set if the 0x25 command fails so we try just once int x1cx03cmdfails; // This will get set if the 0x1c 0x03 command fails so we try just once int poweron; // to prevent powering on more than once - int filter; // Current filter selected + unsigned char filter; // Current filter selected }; extern const struct ts_sc_list r8500_ts_sc_list[]; commit 0fa00cb14f12600c9863ab9369e5eb510108a252 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 12:31:32 2020 -0600 Missed icom.h commit https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index cb564ee5..9120c364 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -203,6 +203,7 @@ struct icom_priv_data int x25cmdfails; // This will get set if the 0x25 command fails so we try just once int x1cx03cmdfails; // This will get set if the 0x1c 0x03 command fails so we try just once int poweron; // to prevent powering on more than once + int filter; // Current filter selected }; extern const struct ts_sc_list r8500_ts_sc_list[]; commit 915666add2c857c2c74cf4623992c419c27812ad Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 12:21:54 2020 -0600 Remember filter setting from icom_get_mode so we can refer to it later on set_mode https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 19ad7460..0e32beca 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1857,16 +1857,29 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) { unsigned char modebuf[MAXFRAMELEN]; const struct icom_priv_caps *priv_caps; + struct icom_priv_data *priv_data; int mode_len, retval; rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo)); priv_caps = (const struct icom_priv_caps *) rig->caps->priv; + priv_data = (struct icom_priv_data *) rig->state.priv; retval = icom_transaction(rig, C_RD_MODE, -1, NULL, 0, modebuf, &mode_len); - rig_debug(RIG_DEBUG_TRACE, - "%s: modebuf[0]=0x%02x, modebuf[1]=0x%02x, mode_len=%d\n", __func__, modebuf[0], - modebuf[1], mode_len); + if (mode_len == 3) + { + priv_data->filter = modebuf[2] - '0'; + rig_debug(RIG_DEBUG_TRACE, + "%s: modebuf[0]=0x%02x, modebuf[1]=0x%02x, modebuf[2]=0x%02x, mode_len=%d, filter=%d\n", + __func__, modebuf[0], + modebuf[1], modebuf[2], mode_len, priv_data->filter); + } + else + { + rig_debug(RIG_DEBUG_TRACE, + "%s: modebuf[0]=0x%02x, modebuf[1]=0x%02x, mode_len=%d\n", __func__, modebuf[0], + modebuf[1], mode_len); + } if (retval != RIG_OK) { commit e4e88b833d1877797e56726a749e3bf6cdb35a05 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 11:24:07 2020 -0600 Eliminate warning in icom.c for passband nochange https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index e3a7f133..19ad7460 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1651,6 +1651,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, else { rig_debug(RIG_DEBUG_TRACE, "%s RIG_PASSBAND_NOCHANGE\n", __func__); + return RIG_OK; } if (retval != RIG_OK) commit f22d4a6dbe7305b3a84546faa6e462e388a0d3ee Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 10:07:03 2020 -0600 Update icom.h version diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 8a404cc6..cb564ee5 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -30,7 +30,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20201103" +#define BACKEND_VER "20201212" /* * defines used by comp_cal_str in rig.c commit c0743dfe6e6633151b87cdbc5c7321bd11ce9d1a Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 10:06:44 2020 -0600 astyle icom.c diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 033801e5..e3a7f133 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1627,25 +1627,26 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, break; } - if (width != RIG_PASSBAND_NOCHANGE) { - if (filter_byte) // then we need the width byte too - { - unsigned char mode_icom; // not used as it will map to USB/LSB - signed char width_icom; - rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom); - // since width_icom is 0-2 for rigs that need this here we have to make it 1-3 - datamode[1] = datamode[0] ? width_icom : 0; - retval = - icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, width_icom == -1 ? 1 : 2, - ackbuf, - &ack_len); - } - else + if (width != RIG_PASSBAND_NOCHANGE) { - retval = - icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf, - &ack_len); - } + if (filter_byte) // then we need the width byte too + { + unsigned char mode_icom; // not used as it will map to USB/LSB + signed char width_icom; + rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom); + // since width_icom is 0-2 for rigs that need this here we have to make it 1-3 + datamode[1] = datamode[0] ? width_icom : 0; + retval = + icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, width_icom == -1 ? 1 : 2, + ackbuf, + &ack_len); + } + else + { + retval = + icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf, + &ack_len); + } } else { commit 2ff3fa0782377eed7b9b766caaf41d99c434cc22 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 10:06:00 2020 -0600 icom now recognizes RIG_PASSBAND_NOCHANGE https://github.com/Hamlib/Hamlib/issues/448 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index acbc309f..033801e5 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1627,6 +1627,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, break; } + if (width != RIG_PASSBAND_NOCHANGE) { if (filter_byte) // then we need the width byte too { unsigned char mode_icom; // not used as it will map to USB/LSB @@ -1645,6 +1646,11 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf, &ack_len); } + } + else + { + rig_debug(RIG_DEBUG_TRACE, "%s RIG_PASSBAND_NOCHANGE\n", __func__); + } if (retval != RIG_OK) { commit e1aa80599f419025e1894a449ab18924817ebe9f Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 08:34:32 2020 -0600 Add some more debug for Yaesu RFPOWER_METER levels https://github.com/Hamlib/Hamlib/issues/462 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 2252ed4a..08d98313 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -4369,6 +4369,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) break; case RIG_LEVEL_RFPOWER_METER: + rig_debug(RIG_DEBUG_VERBOSE, "%s: RFPOWER_METER retlvl=%s\n", __func__, retlvl); if (retlvl_len > 3) { // Some rigs like FTDX101 have 6-byte return so we just truncate commit ffe7184970ccfde09e85db02d7d7bad743ee54a1 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Dec 12 08:24:33 2020 -0600 Normalize Yaesu RFPOWER_METER_LEVELS to 100W This is a quick fix for most Yaesu rigs We need a new RIG_LEVEL_RFPOWER_METER_WATTS to return watts instead of 0-1.0 https://github.com/Hamlib/Hamlib/issues/462 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index a088f0ca..2252ed4a 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -163,7 +163,7 @@ const cal_table_float_t yaesu_default_comp_meter_cal = 2, { {0, 0.0f}, - {255, 1.0f}, + {255, 100.0f}, } }; @@ -4372,7 +4372,9 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (retlvl_len > 3) { // Some rigs like FTDX101 have 6-byte return so we just truncate + rig_debug(RIG_DEBUG_VERBOSE, "%s: retlvl of %s getting truncated\n", __func__, retlvl); retlvl[3] = 0; + rig_debug(RIG_DEBUG_VERBOSE, "%s: retlvl truncated to %s\n", __func__, retlvl); } if (rig->caps->rfpower_meter_cal.size == 0) @@ -4383,6 +4385,12 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { val->f = rig_raw2val_float(atoi(retlvl), &rig->caps->rfpower_meter_cal); } + rig_debug(RIG_DEBUG_VERBOSE, "%s: RFPOWER_METER=%s, converted to %f\n", __func__, retlvl, val->f); + if (val->f > 1.0) + { + rig_debug(RIG_DEBUG_VERBOSE, "%s: val->f(%f) clipped at 1.0\n", __func__, val->f); + val->f = 1.0; + } break; @@ -4395,11 +4403,11 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) if (rig->caps->comp_meter_cal.size == 0) { - val->f = rig_raw2val_float(atoi(retlvl), &yaesu_default_comp_meter_cal); + val->f = rig_raw2val_float(atoi(retlvl), &yaesu_default_comp_meter_cal)/100; } else { - val->f = rig_raw2val_float(atoi(retlvl), &rig->caps->comp_meter_cal); + val->f = rig_raw2val_float(atoi(retlvl), &rig->caps->comp_meter_cal)/100; } break; diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 0a88e03f..6b8e76e6 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201211" +#define NEWCAT_VER "20201212" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit 44baf44dccd86467f7aa6b529fcfefeb3501595c Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 17:20:34 2020 -0600 Update rigctl.1 man page diff --git a/doc/man1/rigctl.1 b/doc/man1/rigctl.1 index 1913b7e9..b2fde9ce 100644 --- a/doc/man1/rigctl.1 +++ b/doc/man1/rigctl.1 @@ -88,6 +88,8 @@ etc. on Linux, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system's documentation. .IP +Can be a network address:port, e.g. 127.0.0.1:12345 +.IP The special string \(lquh\-rig\(rq may be given to enable micro-ham device support. . commit 5a86a1657fe50d96b2fed22cffeb8ba61c887c64 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 17:00:21 2020 -0600 Change post_write_delay on FT950 to 25ms https://github.com/Hamlib/Hamlib/issues/461 diff --git a/rigs/yaesu/ft950.h b/rigs/yaesu/ft950.h index cdea56a6..e7bccd4a 100644 --- a/rigs/yaesu/ft950.h +++ b/rigs/yaesu/ft950.h @@ -137,6 +137,6 @@ /* Delay sequential fast writes */ //#define FT950_POST_WRITE_DELAY 5 -#define FT950_POST_WRITE_DELAY 0 +#define FT950_POST_WRITE_DELAY 25 #endif /* _FT950_H */ commit 7911fd1d4bd04df0a1d9d737b4817653feca75b2 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 16:38:02 2020 -0600 Add power level to ft991 and fix ft1200 table https://github.com/Hamlib/Hamlib/issues/462 diff --git a/rigs/yaesu/ft1200.h b/rigs/yaesu/ft1200.h index 3b1a9389..535bee43 100644 --- a/rigs/yaesu/ft1200.h +++ b/rigs/yaesu/ft1200.h @@ -76,13 +76,14 @@ // Borrowed from FLRig -- Thanks to Dave W1HKJ #define FTDX1200_RFPOWER_METER_CAL \ { \ - 5, \ + 6, \ { \ - {35, 5.0f}, \ - {94, 25.0f}, \ - {147, 50.0f}, \ - {176, 75.0f}, \ - {205, 100.0f}, \ + {10, 0.8f}, \ + {50, 8.0f}, \ + {100, 26.0f}, \ + {150, 54.0f}, \ + {200, 92.0f}, \ + {250, 140.0f}, \ } \ } diff --git a/rigs/yaesu/ft991.c b/rigs/yaesu/ft991.c index 60568197..ecf67299 100644 --- a/rigs/yaesu/ft991.c +++ b/rigs/yaesu/ft991.c @@ -91,6 +91,7 @@ const struct rig_caps ft991_caps = .transceive = RIG_TRN_OFF, /* May enable later as the 950 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, + .rfpower_meter_cal = FT991_RFPOWER_METER_CAL, .str_cal = FT991_STR_CAL, .chan_list = { { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, diff --git a/rigs/yaesu/ft991.h b/rigs/yaesu/ft991.h index 159aeeac..97ee43be 100644 --- a/rigs/yaesu/ft991.h +++ b/rigs/yaesu/ft991.h @@ -71,6 +71,20 @@ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ RIG_OP_TO_VFO|RIG_OP_FROM_VFO) +// Borrowed from FLRig -- Thanks to Dave W1HKJ +#define FT991_RFPOWER_METER_CAL \ + { \ + 6, \ + { \ + {10, 0.8f}, \ + {50, 8.0f}, \ + {100, 26.0f}, \ + {150, 54.0f}, \ + {200, 92.0f}, \ + {250, 140.0f}, \ + } \ + } + /* TBC */ #define FT991_STR_CAL { 16, \ { \ commit ff17dd0199f6613549f74cb8cb3351b708338a4a Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 16:31:24 2020 -0600 Add power level to ft1200 https://github.com/Hamlib/Hamlib/issues/462 diff --git a/rigs/yaesu/ft1200.c b/rigs/yaesu/ft1200.c index 9aa8928a..3e295e95 100644 --- a/rigs/yaesu/ft1200.c +++ b/rigs/yaesu/ft1200.c @@ -131,6 +131,7 @@ const struct rig_caps ftdx1200_caps = .transceive = RIG_TRN_OFF, /* May enable later as the 1200 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, + .rfpower_meter_cal = FTDX1200_RFPOWER_METER_CAL, .str_cal = FTDX1200_STR_CAL, .chan_list = { { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, diff --git a/rigs/yaesu/ft1200.h b/rigs/yaesu/ft1200.h index 88afd85d..3b1a9389 100644 --- a/rigs/yaesu/ft1200.h +++ b/rigs/yaesu/ft1200.h @@ -73,6 +73,19 @@ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ RIG_OP_TO_VFO|RIG_OP_FROM_VFO|RIG_OP_TOGGLE) +// Borrowed from FLRig -- Thanks to Dave W1HKJ +#define FTDX1200_RFPOWER_METER_CAL \ + { \ + 5, \ + { \ + {35, 5.0f}, \ + {94, 25.0f}, \ + {147, 50.0f}, \ + {176, 75.0f}, \ + {205, 100.0f}, \ + } \ + } + /* TBC */ #define FTDX1200_STR_CAL { 16, \ { \ commit d1ea35c93e0d4c7313b31415d456befdf90ad7bb Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 16:28:56 2020 -0600 https://github.com/Hamlib/Hamlib/issues/462 diff --git a/rigs/yaesu/ft950.c b/rigs/yaesu/ft950.c index 1141eba2..f71ebea3 100644 --- a/rigs/yaesu/ft950.c +++ b/rigs/yaesu/ft950.c @@ -131,6 +131,7 @@ const struct rig_caps ft950_caps = .transceive = RIG_TRN_OFF, /* May enable later as the 950 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, + .rfpower_meter_cal = FT950_RFPOWER_METER_CAL, .str_cal = FT950_STR_CAL, .chan_list = { { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, diff --git a/rigs/yaesu/ft950.h b/rigs/yaesu/ft950.h index 09de523e..cdea56a6 100644 --- a/rigs/yaesu/ft950.h +++ b/rigs/yaesu/ft950.h @@ -72,6 +72,21 @@ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ RIG_OP_TO_VFO|RIG_OP_FROM_VFO|RIG_OP_TOGGLE) +// Borrowed from FLRig -- Thanks to Dave W1HKJ +#define FT950_RFPOWER_METER_CAL \ + { \ + 6, \ + { \ + {10, 0.8f}, \ + {50, 8.0f}, \ + {100, 26.0f}, \ + {150, 54.0f}, \ + {200, 92.0f}, \ + {250, 140.0f}, \ + } \ + } + + /* TBC */ #define FT950_STR_CAL { 16, \ { \ commit 354cb925ccf1df37d2bde19d4d81dea25e6953e5 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 16:25:21 2020 -0600 Add power level to ft891 https://github.com/Hamlib/Hamlib/issues/462 diff --git a/rigs/yaesu/ft891.c b/rigs/yaesu/ft891.c index 1c4b3c7d..0740f055 100644 --- a/rigs/yaesu/ft891.c +++ b/rigs/yaesu/ft891.c @@ -92,6 +92,7 @@ const struct rig_caps ft891_caps = .transceive = RIG_TRN_OFF, /* May enable later as the 950 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, + .rfpower_meter_cal = FT891_RFPOWER_METER_CAL, .str_cal = FT891_STR_CAL, .chan_list = { { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, diff --git a/rigs/yaesu/ft891.h b/rigs/yaesu/ft891.h index 6a3b541f..daea8917 100644 --- a/rigs/yaesu/ft891.h +++ b/rigs/yaesu/ft891.h @@ -68,6 +68,16 @@ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ RIG_OP_TO_VFO|RIG_OP_FROM_VFO) +// Borrowed from FLRig -- Thanks to Dave W1HKJ +#define FT891_RFPOWER_METER_CAL \ + { \ + 2, \ + { \ + {0, 0.0f}, \ + {100, 100.0f}, \ + } \ + } + /* TBC */ #define FT891_STR_CAL { 16, \ { \ commit 97a28ea75f04fb504394565d033d6b895bc10235 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 16:21:36 2020 -0600 Fix FT450 power levels https://github.com/Hamlib/Hamlib/issues/462 diff --git a/rigs/yaesu/ft450.c b/rigs/yaesu/ft450.c index d0be5671..7bd00548 100644 --- a/rigs/yaesu/ft450.c +++ b/rigs/yaesu/ft450.c @@ -86,6 +86,7 @@ const struct rig_caps ft450_caps = .transceive = RIG_TRN_OFF, /* May enable later as the 450 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, + .rfpower_meter_cal = FT450_RFPOWER_METER_CAL, .str_cal = FT450_STR_CAL, .chan_list = { { 1, 500, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, diff --git a/rigs/yaesu/ft450.h b/rigs/yaesu/ft450.h index e39cb291..20da880c 100644 --- a/rigs/yaesu/ft450.h +++ b/rigs/yaesu/ft450.h @@ -76,6 +76,20 @@ RIG_OP_TOGGLE) +// Borrowed from FLRig -- Thanks to Dave W1HKJ +#define FT450_RFPOWER_METER_CAL \ + { \ + 6, \ + { \ + {10, 0.8f}, \ + {50, 8.0f}, \ + {100, 26.0f}, \ + {150, 54.0f}, \ + {200, 92.0f}, \ + {250, 140.0f}, \ + } \ + } + /* TBC */ #define FT450_STR_CAL { 3, \ { \ commit 09da908bb393b7d45e9e7d4654289a40eee4ecf5 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 16:12:11 2020 -0600 Add ftdx9000 power levels https://github.com/Hamlib/Hamlib/issues/462Z diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index e1b166e7..caec2721 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -57,6 +57,8 @@ 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) + #define streq(s1,s2) (strcmp(s1,s2)==0) static int flrig_init(RIG *rig); @@ -84,6 +86,8 @@ static int flrig_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq, rmode_t mode, pbwidth_t width); static int flrig_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width); +static int flrig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); +static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val); static const char *flrig_get_info(RIG *rig); @@ -124,8 +128,8 @@ const struct rig_caps flrig_caps = .has_get_func = RIG_FUNC_NONE, .has_set_func = RIG_FUNC_NONE, - .has_get_level = RIG_LEVEL_NONE, - .has_set_level = RIG_LEVEL_NONE, + .has_get_level = FLRIG_LEVELS, + .has_set_level = RIG_LEVEL_SET(FLRIG_LEVELS), .has_get_parm = RIG_PARM_NONE, .has_set_parm = RIG_PARM_NONE, .filters = { @@ -169,7 +173,9 @@ const struct rig_caps flrig_caps = .set_split_vfo = flrig_set_split_vfo, .get_split_vfo = flrig_get_split_vfo, .set_split_freq_mode = flrig_set_split_freq_mode, - .get_split_freq_mode = flrig_get_split_freq_mode + .get_split_freq_mode = flrig_get_split_freq_mode, + .set_level = flrig_set_level, + .get_level = flrig_get_level }; // Structure for mapping flrig dynmamic modes to hamlib modes @@ -1851,6 +1857,93 @@ static int flrig_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq, return retval; } +static int flrig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) +{ + int retval; + char cmd_arg[MAXARGLEN]; + char *cmd; + + rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s level=%d, val=%f\n", __func__, + rig_strvfo(vfo), (int)level, val.f); + + if (check_vfo(vfo) == FALSE) + { + rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", + __func__, rig_strvfo(vfo)); + return -RIG_EINVAL; + } + + sprintf(cmd_arg, + "<params><param><value><double>%d</double></value></param></params>", (int)val.f); + + switch (level) + { + case RIG_LEVEL_RF: cmd = "rig.set_rfgain"; break; + + case RIG_LEVEL_AF: cmd = "rig.set_volume"; break; + + case RIG_LEVEL_MICGAIN: cmd = "rig.set_micgain"; break; + + default: + rig_debug(RIG_DEBUG_ERR, "%s: invalid level=%d\n", __func__, (int)level); + return -RIG_EINVAL; + } + + retval = flrig_transaction(rig, cmd, cmd_arg, NULL, 0); + + if (retval < 0) + { + return retval; + } + + return RIG_OK; +} + +/* + * flrig_get_level + * Assumes rig!=NULL, rig->state.priv!=NULL, val!=NULL + */ +static int flrig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) +{ + char value[MAXARGLEN]; + char *cmd; + int retval; + + rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__, + rig_strvfo(vfo)); + + + switch (level) + { + case RIG_LEVEL_AF: cmd = "rig.get_volume"; break; + + case RIG_LEVEL_RF: cmd = "rig.get_rfgain"; break; + + case RIG_LEVEL_MICGAIN: cmd = "rig.get_micgain"; break; + + case RIG_LEVEL_STRENGTH: cmd = "rig.get_power"; break; + + default: + rig_debug(RIG_DEBUG_ERR, "%s: unknown level=%d\n", __func__, (int)level); + return -RIG_EINVAL; + } + + retval = flrig_transaction(rig, cmd, NULL, value, sizeof(value)); + + if (retval != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: flrig_transaction failed retval=%s\n", __func__, + rigerror(retval)); + return retval; + } + + val->f = atof(value); + + rig_debug(RIG_DEBUG_TRACE, "%s: val='%s'(%f)\n", __func__, value, val->f); + + return RIG_OK; +} + /* * flrig_get_info * assumes rig!=NULL diff --git a/rigs/dummy/flrig.h b/rigs/dummy/flrig.h index 8459eb8e..f49a1934 100644 --- a/rigs/dummy/flrig.h +++ b/rigs/dummy/flrig.h @@ -28,7 +28,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20200617" +#define BACKEND_VER "20201209" #define EOM "\r" #define TRUE 1 diff --git a/rigs/yaesu/ft9000.c b/rigs/yaesu/ft9000.c index 149a43df..cd573c37 100644 --- a/rigs/yaesu/ft9000.c +++ b/rigs/yaesu/ft9000.c @@ -93,6 +93,7 @@ const struct rig_caps ft9000_caps = .transceive = RIG_TRN_OFF, /* May enable later as the 9000 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, + .rfpower_meter_cal = FT9000_RFPOWER_METER_CAL, .str_cal = FT9000_STR_CAL, .chan_list = { /* TBC */ diff --git a/rigs/yaesu/ft9000.h b/rigs/yaesu/ft9000.h index 03525832..5d8f13ee 100644 --- a/rigs/yaesu/ft9000.h +++ b/rigs/yaesu/ft9000.h @@ -81,6 +81,25 @@ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ RIG_OP_TO_VFO|RIG_OP_FROM_VFO|RIG_OP_TOGGLE) +// Borrowed from FLRig -- Thanks to Dave W1HKJ +#define FT9000_RFPOWER_METER_CAL \ + { \ + 11, \ + { \ + {35, 10.0f}, \ + {53, 20.0f}, \ + {80, 40.0f}, \ + {97, 60.0f}, \ + {119, 80.0f}, \ + {137, 100.0f}, \ + {154, 120.0f}, \ + {167, 140.0f}, \ + {177, 160.0f}, \ + {188, 180.0f}, \ + {197, 200.0f}, \ + } \ + } + /* TBC */ #define FT9000_STR_CAL { 16, \ { \ diff --git a/rigs/yaesu/ftdx101.h b/rigs/yaesu/ftdx101.h index fe271b9e..b9c3230a 100644 --- a/rigs/yaesu/ftdx101.h +++ b/rigs/yaesu/ftdx101.h @@ -71,7 +71,7 @@ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ RIG_OP_TO_VFO|RIG_OP_FROM_VFO|RIG_OP_TOGGLE) -// Borrowed from FLRig -- Thanks to Dave W +// Borrowed from FLRig -- Thanks to Dave W1HKJ #define FTDX101D_RFPOWER_METER_CAL \ { \ 5, \ diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 0467857e..a088f0ca 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -4162,7 +4162,14 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) return -RIG_ENAVAIL; } - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM5%c", cat_term); + if (is_ftdx9000) + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM08%c", cat_term); + } + else + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM5%c", cat_term); + } break; case RIG_LEVEL_COMP_METER: commit 0a7c229f068daaf1d1be93f7410f06f8c7f71bd2 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 14:55:33 2020 -0600 Fix retries in newcat.c https://github.com/Hamlib/Hamlib/issues/463 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 4e00d6ea..0467857e 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -8963,6 +8963,7 @@ int newcat_get_cmd(RIG *rig) __func__, priv->ret_data); // we were using BUSBUSY but microham devices need retries //rc = -RIG_BUSBUSY; /* don't write command again */ + rc = -RIG_EPROTO; /* we could decrement retry_count here but there is a danger of infinite looping so we just use up @@ -9038,6 +9039,7 @@ int newcat_get_cmd(RIG *rig) // we were using BUSBUSY but microham devices need retries // this should be OK under all other circumstances too //rc = -RIG_BUSBUSY; /* retry read only */ + rc = -RIG_EPROTO; } } diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 9ce0859e..0a88e03f 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201209" +#define NEWCAT_VER "20201211" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit f60f9e0181b4926729c7fbb88571152843440120 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 12:25:01 2020 -0600 Fix RFPOWER levels for ftdx101 https://github.com/Hamlib/Hamlib/issues/462 diff --git a/rigs/yaesu/ftdx101.c b/rigs/yaesu/ftdx101.c index c7f517fb..5152e05c 100644 --- a/rigs/yaesu/ftdx101.c +++ b/rigs/yaesu/ftdx101.c @@ -37,8 +37,6 @@ #include "newcat.h" #include "ftdx101.h" -cal_table_float_t yaesu_ftdx101d_swr_cal = FTDX101D_SWR_CAL; - const struct newcat_priv_caps ftdx101d_priv_caps = { .roofing_filter_count = 6, @@ -78,7 +76,7 @@ const struct rig_caps ftdx101d_caps = RIG_MODEL(RIG_MODEL_FTDX101D), .model_name = "FTDX101D", .mfg_name = "Yaesu", - .version = NEWCAT_VER ".6", + .version = NEWCAT_VER ".7", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -119,6 +117,7 @@ const struct rig_caps ftdx101d_caps = .transceive = RIG_TRN_OFF, /* May enable later as the FTDX101 has an Auto Info command */ .bank_qty = 0, .chan_desc_sz = 0, + .rfpower_meter_cal = FTDX101D_RFPOWER_METER_CAL, .swr_cal = FTDX101D_SWR_CAL, .chan_list = { { 1, 99, RIG_MTYPE_MEM, NEWCAT_MEM_CAP }, diff --git a/rigs/yaesu/ftdx101.h b/rigs/yaesu/ftdx101.h index 5e0309f4..fe271b9e 100644 --- a/rigs/yaesu/ftdx101.h +++ b/rigs/yaesu/ftdx101.h @@ -71,6 +71,19 @@ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ RIG_OP_TO_VFO|RIG_OP_FROM_VFO|RIG_OP_TOGGLE) +// Borrowed from FLRig -- Thanks to Dave W +#define FTDX101D_RFPOWER_METER_CAL \ + { \ + 5, \ + { \ + {35, 5.0f}, \ + {94, 25.0f}, \ + {147, 50.0f}, \ + {176, 75.0f}, \ + {205, 100.0f}, \ + } \ + } + // Based on testing with G3VPX Ian Sumner #define FTDX101D_SWR_CAL \ { \ ----------------------------------------------------------------------- Summary of changes: doc/man1/rigctl.1 | 2 + rigs/dummy/flrig.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++++-- rigs/dummy/flrig.h | 2 +- rigs/icom/frame.c | 11 ++++- rigs/icom/icom.c | 65 ++++++++++++++++++++--------- rigs/icom/icom.h | 3 +- rigs/yaesu/ft1200.c | 1 + rigs/yaesu/ft1200.h | 14 +++++++ rigs/yaesu/ft450.c | 1 + rigs/yaesu/ft450.h | 14 +++++++ rigs/yaesu/ft891.c | 1 + rigs/yaesu/ft891.h | 10 +++++ rigs/yaesu/ft9000.c | 1 + rigs/yaesu/ft9000.h | 19 +++++++++ rigs/yaesu/ft950.c | 1 + rigs/yaesu/ft950.h | 17 +++++++- rigs/yaesu/ft991.c | 1 + rigs/yaesu/ft991.h | 14 +++++++ rigs/yaesu/ftdx101.c | 5 +-- rigs/yaesu/ftdx101.h | 13 ++++++ rigs/yaesu/newcat.c | 30 +++++++++++--- rigs/yaesu/newcat.h | 2 +- 22 files changed, 304 insertions(+), 36 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |