kopia lustrzana https://github.com/Hamlib/Hamlib
Allow for failed test command on the K2
The K2 initialization was checking if RTTY mode was available by sending an MD6; command and they querying the mode to check if it worked. The latest kenwood routines now fail if an invalid command is sent to the K2 initialization need only try the MD6; command to see if RTTY is available on the rig.Hamlib-3.0
rodzic
64d080af2e
commit
5ef9bde498
13
kenwood/k2.c
13
kenwood/k2.c
|
@ -503,18 +503,13 @@ int k2_probe_mdfw(RIG *rig, struct kenwood_priv_data *priv)
|
|||
|
||||
/* First try to put the K2 into RTTY mode and check if it's available. */
|
||||
err = kenwood_simple_cmd(rig, "MD6");
|
||||
if (err != RIG_OK)
|
||||
if (err != RIG_OK && err != -RIG_ERJCTED)
|
||||
return err;
|
||||
|
||||
/* Check for mode and test to see if K2 reports RTTY. */
|
||||
err = kenwood_safe_transaction(rig, "MD", buf, KENWOOD_MAX_BUF_LEN, 4);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
if (strcmp("MD6", buf) == 0)
|
||||
priv->k2_md_rtty = 1; /* set flag for RTTY mode installed */
|
||||
if (-RIG_ERJCTED == err)
|
||||
priv->k2_md_rtty = 0; /* set flag for RTTY mode installed */
|
||||
else
|
||||
priv->k2_md_rtty = 0; /* RTTY module not installed */
|
||||
priv->k2_md_rtty = 1; /* RTTY module not installed */
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: RTTY flag is: %d\n", __func__, priv->k2_md_rtty);
|
||||
|
||||
i = (priv->k2_md_rtty == 1) ? 2 : 1;
|
||||
|
|
Ładowanie…
Reference in New Issue