From eefea70a248f4de283037c5878f080f0b370492e Mon Sep 17 00:00:00 2001 From: Mikael Nousiainen Date: Fri, 8 Jan 2021 09:12:29 +0200 Subject: [PATCH 1/2] Fix SH and AN commands on FT-2000 for VFOB as these commands are not targetable --- rigs/yaesu/newcat.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 76f94cdcd..f5a03ea11 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -3010,7 +3010,7 @@ int newcat_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) return err; } - if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) + if ((rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && !is_ft2000) { main_sub_vfo = (RIG_VFO_B == vfo || RIG_VFO_SUB == vfo) ? '1' : '0'; } @@ -3102,7 +3102,7 @@ int newcat_get_ant(RIG *rig, vfo_t vfo, ant_t dummy, value_t *option, return err; } - if (rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) + if ((rig->caps->targetable_vfo & RIG_TARGETABLE_MODE) && !is_ft2000) { main_sub_vfo = (RIG_VFO_B == vfo || RIG_VFO_SUB == vfo) ? '1' : '0'; } @@ -7465,6 +7465,10 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SH%c%d%02d;", main_sub_vfo, on, w); } + else if (is_ft2000) + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SH0%02d;", w); + } else { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SH%c%02d;", main_sub_vfo, w); @@ -7690,8 +7694,15 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) if (sh_command_valid) { - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", cmd, main_sub_vfo, - cat_term); + if (is_ft2000) + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s0%c", cmd, cat_term); + } + else + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s%c%c", cmd, main_sub_vfo, + cat_term); + } err = newcat_get_cmd(rig); From 9e8b7539bbc0f822fcd7e8bc0f7e77a12e37378f Mon Sep 17 00:00:00 2001 From: Mikael Nousiainen Date: Fri, 8 Jan 2021 09:13:56 +0200 Subject: [PATCH 2/2] Set FT-2000 retries to 3 to follow other Yaesu backends. There should be no need for 10 retries. --- rigs/yaesu/ft2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rigs/yaesu/ft2000.c b/rigs/yaesu/ft2000.c index aeaa6af13..c4428cf04 100644 --- a/rigs/yaesu/ft2000.c +++ b/rigs/yaesu/ft2000.c @@ -107,7 +107,7 @@ const struct rig_caps ft2000_caps = .write_delay = FT2000_WRITE_DELAY, .post_write_delay = FT2000_POST_WRITE_DELAY, .timeout = 2000, - .retry = 10, + .retry = 3, .has_get_func = FT2000_FUNCS, .has_set_func = FT2000_FUNCS, .has_get_level = FT2000_LEVELS,