Move kenwood get_id before firmware check and only when first get-id fails

https://github.com/Hamlib/Hamlib/issues/230
pull/234/head
mdblack98 2020-05-01 14:44:05 -05:00
rodzic d5d6c55439
commit d1677a71d3
2 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -703,9 +703,14 @@ int kenwood_open(RIG *rig)
{ {
// Ensure rig is on // Ensure rig is on
rig_set_powerstat(rig, 1); 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) if (RIG_IS_TS590S)
{ {
/* we need the firmware version for these rigs to deal with f/w defects */ /* 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); priv->fw_rev);
} }
/* get id in buffer, will be null terminated */
err = kenwood_get_id(rig, id);
if (!RIG_IS_XG3 && -RIG_ETIMEOUT == err) if (!RIG_IS_XG3 && -RIG_ETIMEOUT == err)
{ {
/* Some Kenwood emulations have no ID command response :( /* Some Kenwood emulations have no ID command response :(

Wyświetl plik

@ -27,7 +27,7 @@
#include <string.h> #include <string.h>
#include "token.h" #include "token.h"
#define BACKEND_VER "20200429" #define BACKEND_VER "20200501"
#define EOM_KEN ';' #define EOM_KEN ';'
#define EOM_TH '\r' #define EOM_TH '\r'