From 5453a9c0360f7672b82d944d25d032cfa1167b65 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Sun, 11 Oct 2020 22:25:01 -0500 Subject: [PATCH] Fix ability to get Sub VFO in newcat get_func https://github.com/Hamlib/Hamlib/issues/413 --- rigs/yaesu/newcat.c | 8 ++++++++ rigs/yaesu/newcat.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 806ef4c3d..727498eba 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -3926,6 +3926,11 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status) rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + if (rig->caps->targetable_vfo & (RIG_TARGETABLE_MODE | RIG_TARGETABLE_TONE)) + { + main_sub_vfo = (RIG_VFO_B == vfo || RIG_VFO_SUB == vfo) ? '1' : '0'; + } + switch (func) { case RIG_FUNC_ANF: @@ -6753,6 +6758,9 @@ int newcat_get_cmd(RIG *rig) || strcmp(priv->cmd_str, "NL1;") == 0 || strcmp(priv->cmd_str, "NR0;") == 0 || strcmp(priv->cmd_str, "NR1;") == 0 + || strcmp(priv->cmd_str, "NR0;") == 0 + || strcmp(priv->cmd_str, "NR1;") == 0 + || strcmp(priv->cmd_str, "OS0;") == 0 || strcmp(priv->cmd_str, "OS0;") == 0 || strcmp(priv->cmd_str, "OS1;") == 0 || strcmp(priv->cmd_str, "PA0;") == 0 diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 22ec3ec02..714b82bcf 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20201010" +#define NEWCAT_VER "20201011" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129