[Hamlib-commits] Hamlib -- Ham radio control libraries branch Hamlib-4.5.5 updated. 4.5.4-20-g88f6e
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2023-01-25 13:39:49
|
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.5.5 has been updated via 88f6eb29a8d29900f8486f550566f6628a64c12b (commit) via 858737fa024ae1a73d09e735aa98239e67674808 (commit) via b06f8fcb31f2a8062f2b03ebb1439adb283cb80c (commit) via 9b3365941486109f761e8074f3ad703e32268ee2 (commit) via f89b49800f85af23368203422afef182c4da2dc5 (commit) via e089e9849006390d39ebd71cd90fd84f178c962c (commit) via 383794637a8a7992ea015e5a84bf11a2079e6d0d (commit) via 680c56c6ce1772bc97be413ea041b0ebf2650eb1 (commit) via f5b9f6743c9601f06f04d6db4bc3b832072ff6a8 (commit) via f0e7ec385a954113e9c027047a7f8d8f15f120c6 (commit) via 84d86aaa73c337667d43c50afe2bfbb53f9feff9 (commit) via 177d58b7576a3e203d6157a6c2fbfd4fa47ff885 (commit) from dc1d9cf43ef330e8ea518e5bea99c1f83a63147c (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 88f6eb29a8d29900f8486f550566f6628a64c12b Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Jan 24 11:28:33 2023 -0600 Update NEWS diff --git a/NEWS b/NEWS index 378ee292..8662ce99 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ Version 4.6 * Fix FTDX3000 rig split Version 4.5.5 + * Fix QRP QDX PTT to new TQ command due to firmware changes * Remove EX103 check for FTDX5000 * Fix K3/K3S VFOB setting of mode/width * Fix AGC level display in rigctld commit 858737fa024ae1a73d09e735aa98239e67674808 Author: Mike Black W9MDB <mdb...@ya...> Date: Tue Jan 24 11:22:19 2023 -0600 Change QRP QRDX PTT to use TQ instead TX...more incompability with TS-480 standard diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 1d4fb807..59eb9d7a 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -1251,6 +1251,30 @@ int ts480_init(RIG *rig) RETURNFUNC(RIG_OK); } +int qdx_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) +{ + const char *ptt_cmd; + + ENTERFUNC; + rig_debug(RIG_DEBUG_VERBOSE, "%s: ptt=%d\n", __func__, ptt); + + switch (ptt) + { + case RIG_PTT_ON: ptt_cmd = "TQ1"; break; + + case RIG_PTT_OFF: ptt_cmd = "TQ0"; break; + + default: RETURNFUNC(-RIG_EINVAL); + } + + int retval = kenwood_transaction(rig, ptt_cmd, NULL, 0); + + //if (ptt == RIG_PTT_OFF) { hl_usleep(100 * 1000); } // a little time for PTT to turn off + + RETURNFUNC(retval); +} + + /* * TS-480 rig capabilities * Notice that some rigs share the same functions. @@ -1457,7 +1481,7 @@ const struct rig_caps qrplabs_caps = RIG_MODEL(RIG_MODEL_QRPLABS), .model_name = "QCX/QDX", .mfg_name = "QRPLabs", - .version = BACKEND_VER ".0", + .version = BACKEND_VER ".1", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -1780,7 +1804,7 @@ const struct rig_caps pt8000a_caps = .set_split_vfo = kenwood_set_split_vfo, .get_split_vfo = kenwood_get_split_vfo_if, .get_ptt = kenwood_get_ptt, - .set_ptt = kenwood_set_ptt, + .set_ptt = qdx_set_ptt, .get_dcd = kenwood_get_dcd, .set_powerstat = kenwood_set_powerstat, .get_powerstat = kenwood_get_powerstat, commit b06f8fcb31f2a8062f2b03ebb1439adb283cb80c Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Jan 23 14:50:59 2023 -0600 Update NEWS diff --git a/NEWS b/NEWS index ff9b3656..378ee292 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ Version 4.6 * Fix FTDX3000 rig split Version 4.5.5 + * Remove EX103 check for FTDX5000 * Fix K3/K3S VFOB setting of mode/width * Fix AGC level display in rigctld * Change FTDX10 to no serial handshake commit 9b3365941486109f761e8074f3ad703e32268ee2 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Jan 23 14:49:06 2023 -0600 ERemove EX103 get/set for FTDX5000 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 65f8b9f4..ac04d2a8 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -641,6 +641,7 @@ int newcat_open(RIG *rig) rig_debug(RIG_DEBUG_VERBOSE, "%s: disabling FTDX3000 band select\n", __func__); } +#if 0 // this apparently does not work if (is_ftdx5000) { // Remember EX103 status @@ -663,6 +664,7 @@ int newcat_open(RIG *rig) if (priv->ret_data[6] == ';') { priv->front_rear_status = priv->ret_data[5]; } } +#endif RETURNFUNC(RIG_OK); } @@ -695,6 +697,7 @@ int newcat_close(RIG *rig) priv->poweron = 0; } +#if 0 // this apparently does not work -- we can't query EX103 if (is_ftdx5000) { // Restore EX103 status @@ -703,6 +706,7 @@ int newcat_close(RIG *rig) rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str); newcat_set_cmd(rig); // don't care about the return } +#endif RETURNFUNC(RIG_OK); } diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index db1d64c4..60b2c9ad 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20230115" +#define NEWCAT_VER "20230123" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 commit f89b49800f85af23368203422afef182c4da2dc5 Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Jan 23 09:10:58 2023 -0600 Update NEWS diff --git a/NEWS b/NEWS index a1b4ac1c..ff9b3656 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ Version 4.6 * Fix FTDX3000 rig split Version 4.5.5 + * Fix K3/K3S VFOB setting of mode/width * Fix AGC level display in rigctld * Change FTDX10 to no serial handshake * Add TS2000 to has_ps exception commit e089e9849006390d39ebd71cd90fd84f178c962c Author: Mike Black W9MDB <mdb...@ya...> Date: Sun Jan 22 16:45:22 2023 -0600 Fix K3/K3S VFOB mode/bandwidth setting https://github.com/Hamlib/Hamlib/issues/1224 diff --git a/rigs/kenwood/k3.c b/rigs/kenwood/k3.c index a9b0a1f6..cfa530f7 100644 --- a/rigs/kenwood/k3.c +++ b/rigs/kenwood/k3.c @@ -190,7 +190,7 @@ const struct rig_caps k3_caps = RIG_MODEL(RIG_MODEL_K3), .model_name = "K3", .mfg_name = "Elecraft", - .version = BACKEND_VER ".25", + .version = BACKEND_VER ".26", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -343,7 +343,7 @@ const struct rig_caps k3s_caps = RIG_MODEL(RIG_MODEL_K3S), .model_name = "K3S", .mfg_name = "Elecraft", - .version = BACKEND_VER ".19", + .version = BACKEND_VER ".21", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -960,15 +960,21 @@ int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) int err; rmode_t temp_m; pbwidth_t temp_w; - char *cmd_mode = "DT"; + char *cmd_data = "DT"; char *cmd_bw = "BW"; int cmd_bw_len = 6; + struct kenwood_priv_data *priv = rig->state.priv; rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo)); - if (vfo == RIG_VFO_B && rig->caps->rig_model == RIG_MODEL_K4) + if ((priv->is_k3 || priv->is_k3s || priv->is_k4 || priv->is_k4d + || priv->is_k4hd) && vfo == RIG_VFO_B) { - cmd_mode = "DT$"; + if (!(priv->is_k3 || priv->is_k3s)) + { + cmd_data = "DT$"; + } + cmd_bw = "BW$"; cmd_bw_len = 7; @@ -993,8 +999,8 @@ int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) if (temp_m == RIG_MODE_RTTY) { - err = kenwood_safe_transaction(rig, cmd_mode, buf, KENWOOD_MAX_BUF_LEN, - strlen(cmd_mode) + 1); + err = kenwood_safe_transaction(rig, cmd_data, buf, KENWOOD_MAX_BUF_LEN, + strlen(cmd_data) + 1); if (err != RIG_OK) { @@ -1021,8 +1027,8 @@ int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) } else if (temp_m == RIG_MODE_RTTYR) { - err = kenwood_safe_transaction(rig, cmd_mode, buf, KENWOOD_MAX_BUF_LEN, - strlen(cmd_mode) + 1); + err = kenwood_safe_transaction(rig, cmd_data, buf, KENWOOD_MAX_BUF_LEN, + strlen(cmd_data) + 1); if (err != RIG_OK) { diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 1abad7a1..a82fc261 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -2640,8 +2640,8 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) } else { - if (vfo == RIG_VFO_B - && rig->caps->rig_model == RIG_MODEL_K4) // K4 new MD$ command for VFOB + if ((priv->is_k3 || priv->is_k3s || priv->is_k4 || priv->is_k4d + || priv->is_k4hd) && vfo == RIG_VFO_B) { SNPRINTF(cmd, sizeof(cmd), "MD$"); offs = 3; diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index d0c077a0..45494637 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -29,7 +29,7 @@ #include "misc.h" #include "idx_builtin.h" -#define BACKEND_VER "20230115" +#define BACKEND_VER "20230222" #define EOM_KEN ';' #define EOM_TH '\r' commit 383794637a8a7992ea015e5a84bf11a2079e6d0d Author: Mike Black W9MDB <mdb...@ya...> Date: Mon Jan 23 09:09:09 2023 -0600 Fix icom.h diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 27bdebb0..efc28fa4 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -239,10 +239,7 @@ struct icom_priv_caps struct icom_spectrum_scope_caps spectrum_scope_caps; /*!< Icom spectrum scope capabilities, if supported by the rig. Main/Sub scopes in Icom rigs have the same caps. */ struct icom_spectrum_edge_frequency_range spectrum_edge_frequency_ranges[ICOM_MAX_SPECTRUM_FREQ_RANGES]; /*!< Icom spectrum scope edge frequencies, if supported by the rig. Last entry should have zeros in all fields. */ struct cmdparams *extcmds; /*!< Pointer to extended operations array */ -<<<<<<< HEAD -======= int dualwatch_split; /*!< Rig supports dual watch for split ops -- e.g. ID-5100 */ ->>>>>>> 9d096c4a (Improve powerstat on/off behavior for Icom rigs) }; struct icom_priv_data commit 680c56c6ce1772bc97be413ea041b0ebf2650eb1 Author: Mike Black W9MDB <mdb...@ya...> Date: Thu Jan 19 17:15:59 2023 -0600 Allow get_powerstat when rig is powered off https://github.com/Hamlib/Hamlib/issues/1220 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index c9c87c56..91f407fd 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -1753,7 +1753,10 @@ readline_repeat: && cmd_entry->cmd != 0x8f // dump_state && cmd_entry->cmd != 0xf0 // chk_vfo && cmd_entry->cmd != 0x87 // set_powerstat - && my_rig->caps->rig_model != RIG_MODEL_POWERSDR) // some rigs can do stuff when powered off + && cmd_entry->cmd != 0x88 // get_powerstat + && cmd_entry->cmd != 0xa5 // client_version + && my_rig->caps->rig_model != + RIG_MODEL_POWERSDR) // some rigs can do stuff when powered off { rig_debug(RIG_DEBUG_WARN, "%s: command %s not allowed when rig is powered off\n", __func__, commit f5b9f6743c9601f06f04d6db4bc3b832072ff6a8 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Jan 18 23:32:18 2023 -0600 Remove one sleep from set_powerstat loop https://github.com/Hamlib/Hamlib/issues/1212 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 8b91dacb..de5e1871 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -8008,7 +8008,6 @@ int icom_set_powerstat(RIG *rig, powerstat_t status) for (i = 0; i < 5 && retval != RIG_OK; ++i) { - sleep(1); // give it a while to power up retval = icom_get_usb_echo_off(rig); if (retval != RIG_OK) { sleep(1); } commit f0e7ec385a954113e9c027047a7f8d8f15f120c6 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Jan 18 23:27:27 2023 -0600 Make auto_power_on a bit more robust for RigPI which seems slow to get going https://github.com/Hamlib/Hamlib/issues/1212 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index bb90f1bb..8b91dacb 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1140,7 +1140,8 @@ icom_rig_close(RIG *rig) ENTERFUNC; - if (priv->poweron == 0) RETURNFUNC(RIG_OK); // nothing to do + if (priv->poweron == 0) { RETURNFUNC(RIG_OK); } // nothing to do + if (priv->poweron == 1 && rs->auto_power_off) { // maybe we need power off? @@ -7990,11 +7991,8 @@ int icom_set_powerstat(RIG *rig, powerstat_t status) memset(fe_buf, 0xfe, fe_max); // sending more than enough 0xfe's to wake up the rs232 write_block(&rs->rigport, fe_buf, fe_max); - // close and re-open the rig - // on linux the USB gets reset during power on - rig_close(rig); - sleep(1); // let serial bus idle for a while - rig_open(rig); + hl_usleep(200 * + 1000); // need to wait a bit for RigPI and others to queue the echo // we'll try 0x18 0x01 now -- should work on STBY rigs too pwr_sc = S_PWR_ON; @@ -8006,8 +8004,16 @@ int icom_set_powerstat(RIG *rig, powerstat_t status) // poweron == 0 means never powered -- == 2 means CAT turned off if (priv->poweron == 0 || priv->poweron == 2) { - sleep(1); // give it a while to power up - icom_get_usb_echo_off(rig); + retval = -1; + + for (i = 0; i < 5 && retval != RIG_OK; ++i) + { + sleep(1); // give it a while to power up + retval = icom_get_usb_echo_off(rig); + + if (retval != RIG_OK) { sleep(1); } + } + return RIG_OK; } commit 84d86aaa73c337667d43c50afe2bfbb53f9feff9 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Jan 18 15:00:18 2023 -0600 Improve powerstat on/off behavior for Icom rigs https://github.com/Hamlib/Hamlib/issues/1212 diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index d912ad97..bb90f1bb 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -713,6 +713,7 @@ int icom_init(RIG *rig) || rig->caps->rig_model == RIG_MODEL_IC821H || rig->caps->rig_model == RIG_MODEL_IC910 || rig->caps->rig_model == RIG_MODEL_IC2730 + || rig->caps->rig_model == RIG_MODEL_ID5100 ) { priv->x25cmdfails = 1; @@ -991,6 +992,18 @@ icom_rig_open(RIG *rig) rig_debug(RIG_DEBUG_VERBOSE, "%s: %s v%s\n", __func__, rig->caps->model_name, rig->caps->version); + + if (rs->auto_power_on && priv->poweron == 0) + { + rig_debug(RIG_DEBUG_VERBOSE, + "%s asking for power on *****************************************\n", __func__); + rig_set_powerstat(rig, 1); + rig_debug(RIG_DEBUG_VERBOSE, + "%s asking for power on #2 =======================================\n", + __func__); + priv->poweron = 1; + } + retry_open: retval_echo = icom_get_usb_echo_off(rig); @@ -1127,7 +1140,8 @@ icom_rig_close(RIG *rig) ENTERFUNC; - if (priv->poweron != 0 && rs->auto_power_off) + if (priv->poweron == 0) RETURNFUNC(RIG_OK); // nothing to do + if (priv->poweron == 1 && rs->auto_power_off) { // maybe we need power off? rig_debug(RIG_DEBUG_VERBOSE, "%s trying power off\n", __func__); @@ -7971,7 +7985,6 @@ int icom_set_powerstat(RIG *rig, powerstat_t status) { case RIG_POWER_ON: - sleep(1); // let serial bus idle for a while // ic7300 manual says ~150 for 115,200 // we'll just send a few more to be sure for all speeds memset(fe_buf, 0xfe, fe_max); @@ -7990,6 +8003,14 @@ int icom_set_powerstat(RIG *rig, powerstat_t status) retval = icom_transaction(rig, C_SET_PWR, pwr_sc, NULL, 0, ackbuf, &ack_len); + // poweron == 0 means never powered -- == 2 means CAT turned off + if (priv->poweron == 0 || priv->poweron == 2) + { + sleep(1); // give it a while to power up + icom_get_usb_echo_off(rig); + return RIG_OK; + } + break; default: @@ -7997,6 +8018,7 @@ int icom_set_powerstat(RIG *rig, powerstat_t status) fe_buf[0] = 0; retval = icom_transaction(rig, C_SET_PWR, pwr_sc, NULL, 0, ackbuf, &ack_len); + priv->poweron = 2; } i = 0; diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 3f4c3c18..27bdebb0 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -239,6 +239,10 @@ struct icom_priv_caps struct icom_spectrum_scope_caps spectrum_scope_caps; /*!< Icom spectrum scope capabilities, if supported by the rig. Main/Sub scopes in Icom rigs have the same caps. */ struct icom_spectrum_edge_frequency_range spectrum_edge_frequency_ranges[ICOM_MAX_SPECTRUM_FREQ_RANGES]; /*!< Icom spectrum scope edge frequencies, if supported by the rig. Last entry should have zeros in all fields. */ struct cmdparams *extcmds; /*!< Pointer to extended operations array */ +<<<<<<< HEAD +======= + int dualwatch_split; /*!< Rig supports dual watch for split ops -- e.g. ID-5100 */ +>>>>>>> 9d096c4a (Improve powerstat on/off behavior for Icom rigs) }; struct icom_priv_data commit 177d58b7576a3e203d6157a6c2fbfd4fa47ff885 Author: Mike Black W9MDB <mdb...@ya...> Date: Wed Jan 18 07:09:28 2023 -0600 Show AGC Level None when there are no AGC settings for rig https://github.com/Hamlib/Hamlib/issues/1155 diff --git a/tests/dumpcaps.c b/tests/dumpcaps.c index 0100c113..ed5f86db 100644 --- a/tests/dumpcaps.c +++ b/tests/dumpcaps.c @@ -318,6 +318,11 @@ int dumpcaps(RIG *rig, FILE *fout) fprintf(fout, " %d=%s", caps->agc_levels[i], rig_stragclevel(caps->agc_levels[i])); } + + if (i == 0) + { + fprintf(fout, " %d=%s", RIG_AGC_NONE, rig_stragclevel(RIG_AGC_NONE)); + } } fprintf(fout, "\n"); ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +++ rigs/icom/icom.c | 41 ++++++++++++++++++++++++++++++++++------- rigs/icom/icom.h | 1 + rigs/kenwood/k3.c | 24 +++++++++++++++--------- rigs/kenwood/kenwood.c | 4 ++-- rigs/kenwood/kenwood.h | 2 +- rigs/kenwood/ts480.c | 28 ++++++++++++++++++++++++++-- rigs/yaesu/newcat.c | 4 ++++ rigs/yaesu/newcat.h | 2 +- tests/dumpcaps.c | 5 +++++ tests/rigctl_parse.c | 5 ++++- 11 files changed, 96 insertions(+), 23 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |