[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 32d5f2b49e69ad00e91ac
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-13 21:39:28
|
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 32d5f2b49e69ad00e91acd6f0f3030f9923f3878 (commit) via 65d45a07be19e4db6c2bc21f29ff412c03719ca9 (commit) from 8024ffb93731de1b658cc156e8ce158e0341efea (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 32d5f2b49e69ad00e91acd6f0f3030f9923f3878 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 13 15:38:20 2021 -0600 In newcat.c give the BS command 200ms to do it's thing Allow BS command when in split mode We now re-read freq/mode after BS and just return if frequency is already set correctly https://github.com/Hamlib/Hamlib/issues/505 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index d4ce36e8..b7fe8f39 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -801,13 +801,13 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) // // Restore band memory if we can and band is changing -- we do it before we set the frequency - // And only when not in split mode + // And only when not in split mode (note this check has been removed for testing) if (newcat_valid_command(rig, "BS") && newcat_band_index(freq) != newcat_band_index(rig->state.current_freq) - && !rig->state.cache.split + // remove the split check here -- hopefully works OK + //&& !rig->state.cache.split && !is_ft891) // 891 does not remember bandwidth so don't do this { - hl_usleep(200*1000); // seems we need some time before doing band select 200ms enough? snprintf(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c", newcat_band_index(freq), cat_term); @@ -816,6 +816,23 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_ERR, "%s: Unexpected error with BS command=%s\n", __func__, rigerror(err)); } + else + { + // after band select re-read things -- may not have to change anything + freq_t tmp_freqA, tmp_freqB; + rmode_t tmp_mode; + pbwidth_t tmp_width; + rig_get_freq(rig, RIG_VFO_A, &tmp_freqA); + rig_get_freq(rig, RIG_VFO_B, &tmp_freqB); + rig_get_mode(rig, RIG_VFO_A, &tmp_mode, &tmp_width); + rig_get_mode(rig, RIG_VFO_B, &tmp_mode, &tmp_width); + if ((target_vfo == 0 && tmp_freqA == freq) + || (target_vfo == 1 && tmp_freqB == freq)) + { + rig_debug(RIG_DEBUG_VERBOSE, "%s: freq after band select already set to %"PRIfreq"\n", __func__, freq); + return RIG_OK; // we're done then!! + } + } // just drop through } @@ -9396,7 +9413,12 @@ int newcat_set_cmd(RIG *rig) return RIG_OK; } - hl_usleep(11*1000); // some Yaeus rigs have 10ms timeout -- does this fix the ?; reponse problem? + if (strncmp(priv->cmd_str,"BS",2)==0) + { // the BS command needs time to do it's thing + hl_usleep(200*1000); + priv->cache_start.tv_sec = 0; // invalidate the cache + } + /* send the verification command */ rig_debug(RIG_DEBUG_TRACE, "cmd_str = %s\n", verify_cmd); commit 65d45a07be19e4db6c2bc21f29ff412c03719ca9 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 13 15:08:40 2021 -0600 Add cmd list to prm80.c diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c index 580f8a3f..63f720fd 100644 --- a/rigs/prm80/prm80.c +++ b/rigs/prm80/prm80.c @@ -45,6 +45,75 @@ #define BUFSZ 64 +/* V3 commands + * retrieved from https://sourceforge.net/projects/prm80/ +MessageVersion: DB "PRM8060 V3.0", 0 + +MessageAide: DB "H",0Dh,0Ah + DB " Commandes disponibles :",0Dh,0Ah + DB " [0] = Reset.",0Dh,0Ah + DB " [1] a [5] = Show 80c552 port state P1 to P5.",0Dh,0Ah + DB " [A] = Set serial communication to 1200 bps.",0Dh,0Ah + DB " [B] = Set serial communication to 4800 bps.",0Dh,0Ah + DB " [C] = Print channels list.",0Dh,0Ah + DB " [D] = Set system byte.",0Dh,0Ah + DB " [E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq).",0Dh,0Ah + DB " [F] = Set squelch.",0Dh,0Ah + DB " [H] = Print this help page.",0Dh,0Ah + DB " [I] = Erase and init RAM and EEPROM.",0Dh,0Ah + DB " [K] = Set lock byte.",0Dh,0Ah + DB " [L] = Print latch state.",0Dh,0Ah + DB " [M] = Edit external RAM manualy.",0Dh,0Ah + DB " [N] = Set current channel.",0Dh,0Ah + DB " [O] = Set volume.",0Dh,0Ah + DB " [P] = Edit/Add channel.",0Dh,0Ah + DB " [Q] = Set channels number.",0Dh,0Ah + DB " [R] = Set synthetiser frequencies.",0Dh,0Ah + DB " [U] = Print 80c552 internal RAM.",0Dh,0Ah + DB " [S] = Copy EEPROM to external RAM.",0Dh,0Ah + DB " [T] = Set current channel state.",0Dh,0Ah + DB " [V] = Print firmware version.",0Dh,0Ah + DB " [X] = Copy external RAM to EEPROM.",0Dh,0Ah + DB " [Y] = Print first 2 kb from the EEPROM I2C 24c16.",0Dh,0Ah + DB " [Z] = Print external RAM ($0000 to $07FF).",0Dh,0Ah,0 +*/ + +/* V4 commands + * retrieved from https://sourceforge.net/projects/prm80/ + * +MessageVersion: +IF TARGET EQ 8060 + DB "PRM8060 V4.0" +ELSEIF TARGET EQ 8070 + DB "PRM8070 V4.0" +ENDIF + +MessageAide: DB "H",0Dh,0Ah + DB " Commandes disponibles :",0Dh,0Ah + DB " [0] = Reset.",0Dh,0Ah + DB " [1] a [5] = Show 80c552 port state P1 to P5.",0Dh,0Ah + DB " [C] = Print channels list.",0Dh,0Ah + DB " [D] = Set system byte.",0Dh,0Ah + DB " [E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq).",0Dh,0Ah + DB " [F] = Set squelch.",0Dh,0Ah + DB " [H] = Print this help page.",0Dh,0Ah + DB " [I] = Erase and init RAM and EEPROM.",0Dh,0Ah + DB " [K] = Set lock byte.",0Dh,0Ah + DB " [L] = Print latch state.",0Dh,0Ah + DB " [M] = Edit external RAM manualy.",0Dh,0Ah + DB " [N] = Set current channel.",0Dh,0Ah + DB " [O] = Set volume.",0Dh,0Ah + DB " [P] = Edit/Add channel.",0Dh,0Ah + DB " [Q] = Set channels number.",0Dh,0Ah + DB " [R] = Set synthetiser frequencies.",0Dh,0Ah + DB " [U] = Print 80c552 internal RAM.",0Dh,0Ah + DB " [S] = Copy EEPROM to external RAM.",0Dh,0Ah + DB " [T] = Set current channel state.",0Dh,0Ah + DB " [V] = Print firmware version.",0Dh,0Ah + DB " [X] = Copy external RAM to EEPROM.",0Dh,0Ah + DB " [Y] = Print first 2 kb from the EEPROM I2C 24c16.",0Dh,0Ah + DB " [Z] = Print external RAM ($0000 to $07FF).",0Dh,0Ah,0 +*/ /* [0] = Reset. [C] = Print channels list. ----------------------------------------------------------------------- Summary of changes: rigs/prm80/prm80.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++ rigs/yaesu/newcat.c | 30 +++++++++++++++++++---- 2 files changed, 95 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |