[Hamlib-commits] Hamlib -- Ham radio control libraries branch Hamlib-4.0 updated. 0c10e7efc2b894a5c
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Nate B. <n0...@us...> - 2020-12-13 17:02:45
|
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, Hamlib-4.0 has been updated via 0c10e7efc2b894a5cadda7a18820df6bcfdb2946 (commit) via 6557238e0088de2100e816755ed9fee506b5f10e (commit) via cb2cca57d4c08572fcf0504532c6eab4b69954f4 (commit) via 7b3f8715b6c5b69f8e4bb49f82847b897d303ed9 (commit) via f27ab6f734b0e0aa5ea55962ab632de71a614004 (commit) via 51fefa3b7b31f57bf09250b3a09266dad799d343 (commit) via 08d59aac7488a6d5d8515c333dca4feed241a4be (commit) via 8c810c962c4ad90a3b09cb28df64bb77bfc98a54 (commit) via 7f9311569964477e70a17373539ba11d642ae58e (commit) via d63e951c10f3c475376c06522a927a46faee3b67 (commit) via f70712d990e9b59d64ff0e43179c1e34e4a3b466 (commit) via 90e0b036b9abfd894f96531741d538216e6a8a52 (commit) via 57d45dfca1ab125a7a646e5362472e20450a388f (commit) from d2fa649026d461830447fccbd3c3566aac2c9ed9 (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 0c10e7efc2b894a5cadda7a18820df6bcfdb2946 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Dec 9 18:13:58 2020 -0600 Fix retry_save for Kenwood rigs (cherry picked from commit b6d6c5d9663d9625efe6de4663751437740448ff) diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 57e0d739..13adb590 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -3885,7 +3885,11 @@ int kenwood_set_powerstat(RIG *rig, powerstat_t status) sleep(1); retval = rig_get_freq(rig, RIG_VFO_A, &freq); - if (retval == RIG_OK) { return retval; } + if (retval == RIG_OK) + { + rig->state.rigport.retry = retry_save; + return retval; + } rig_debug(RIG_DEBUG_TRACE, "%s: Wait #%d for power up\n", __func__, i + 1); } commit 6557238e0088de2100e816755ed9fee506b5f10e 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 (cherry picked from commit e1aa80599f419025e1894a449ab18924817ebe9f) 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 cb2cca57d4c08572fcf0504532c6eab4b69954f4 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 (cherry picked from commit ffe7184970ccfde09e85db02d7d7bad743ee54a1) 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 7b3f8715b6c5b69f8e4bb49f82847b897d303ed9 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 17:20:34 2020 -0600 Update rigctl.1 man page (cherry picked from commit 44baf44dccd86467f7aa6b529fcfefeb3501595c) 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 f27ab6f734b0e0aa5ea55962ab632de71a614004 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 (cherry picked from commit 5a86a1657fe50d96b2fed22cffeb8ba61c887c64) 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 51fefa3b7b31f57bf09250b3a09266dad799d343 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 (cherry picked from commit 7911fd1d4bd04df0a1d9d737b4817653feca75b2) 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 08d59aac7488a6d5d8515c333dca4feed241a4be 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 (cherry picked from commit ff17dd0199f6613549f74cb8cb3351b708338a4a) 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 8c810c962c4ad90a3b09cb28df64bb77bfc98a54 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Dec 11 16:28:56 2020 -0600 https://github.com/Hamlib/Hamlib/issues/462 (cherry picked from commit d1ea35c93e0d4c7313b31415d456befdf90ad7bb) 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 7f9311569964477e70a17373539ba11d642ae58e 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 (cherry picked from commit 354cb925ccf1df37d2bde19d4d81dea25e6953e5) 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 d63e951c10f3c475376c06522a927a46faee3b67 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 (cherry picked from commit 97a28ea75f04fb504394565d033d6b895bc10235) 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 f70712d990e9b59d64ff0e43179c1e34e4a3b466 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 (cherry picked from commit 09da908bb393b7d45e9e7d4654289a40eee4ecf5) 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 90e0b036b9abfd894f96531741d538216e6a8a52 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 (cherry picked from commit 0a7c229f068daaf1d1be93f7410f06f8c7f71bd2) 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 57d45dfca1ab125a7a646e5362472e20450a388f 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 (cherry picked from commit f60f9e0181b4926729c7fbb88571152843440120) 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 | 99 ++++++++++++++++++++++++++++++++++++++++++++++++-- rigs/dummy/flrig.h | 2 +- rigs/kenwood/kenwood.c | 6 ++- 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 | 26 +++++++++++-- rigs/yaesu/newcat.h | 2 +- 20 files changed, 235 insertions(+), 14 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |