From d1677a71d3df1d85e4cdae755ac2f68f46eb7d83 Mon Sep 17 00:00:00 2001 From: mdblack98 Date: Fri, 1 May 2020 14:44:05 -0500 Subject: [PATCH] Move kenwood get_id before firmware check and only when first get-id fails https://github.com/Hamlib/Hamlib/issues/230 --- rigs/kenwood/kenwood.c | 10 ++++++---- rigs/kenwood/kenwood.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 46b7d840f..96b628c53 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -703,9 +703,14 @@ int kenwood_open(RIG *rig) { // Ensure rig is on rig_set_powerstat(rig, 1); + /* Try get id again */ + err = kenwood_get_id(rig, id); + if (RIG_OK != err) + { + rig_debug(RIG_DEBUG_ERR, "%s: no response to get_id from rig...contintuing anyways.\n", __func__); + } } - if (RIG_IS_TS590S) { /* we need the firmware version for these rigs to deal with f/w defects */ @@ -739,9 +744,6 @@ int kenwood_open(RIG *rig) priv->fw_rev); } - /* get id in buffer, will be null terminated */ - err = kenwood_get_id(rig, id); - if (!RIG_IS_XG3 && -RIG_ETIMEOUT == err) { /* Some Kenwood emulations have no ID command response :( diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index b737064d9..e6c70405a 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -27,7 +27,7 @@ #include #include "token.h" -#define BACKEND_VER "20200429" +#define BACKEND_VER "20200501" #define EOM_KEN ';' #define EOM_TH '\r'