kopia lustrzana https://github.com/Hamlib/Hamlib
Get firmware revision for TS590s in rig_open.
Defects in the TS590s f/w can be addressed selectively according to revision. Enable kenwood_open function for TS590s. For some reason the TS590s did not use the kenwood_open function, as fetching the firmware revision may be required for this rig and it is done in that function; it has been enabled.Hamlib-3.0
rodzic
ff44c229dd
commit
e2b2f884c8
|
@ -457,6 +457,27 @@ int kenwood_open(RIG *rig)
|
|||
char *idptr;
|
||||
char id[KENWOOD_MAX_BUF_LEN];
|
||||
|
||||
if (RIG_MODEL_TS590S == rig->caps->rig_model)
|
||||
{
|
||||
/* we need the firmware version for these rigs to deal with f/w defects */
|
||||
char buffer[KENWOOD_MAX_BUF_LEN];
|
||||
static char fw_version[5];
|
||||
size_t size = KENWOOD_MAX_BUF_LEN;
|
||||
struct kenwood_priv_data * priv = rig->state.priv;
|
||||
|
||||
err = kenwood_transaction (rig, "FV", 0, buffer, &size);
|
||||
if (RIG_OK != err)
|
||||
{
|
||||
rig_debug (RIG_DEBUG_ERR, "%s: cannot get f/w version\n", __func__);
|
||||
return err;
|
||||
}
|
||||
/* store the data between "FV" and ";" which should be a
|
||||
f/w version string of the form n.n e.g. 1.07 */
|
||||
priv->fw_rev = strncpy (fw_version, &buffer[2], size - 3);
|
||||
|
||||
rig_debug (RIG_DEBUG_TRACE, "%s: found f/w version %s\n", __func__, priv->fw_rev);
|
||||
}
|
||||
|
||||
/* get id in buffer, will be null terminated */
|
||||
err = kenwood_get_id(rig, id);
|
||||
if (err != RIG_OK) {
|
||||
|
|
|
@ -75,6 +75,9 @@ struct kenwood_priv_data {
|
|||
int k3_ext_lvl; /* Initial K3 extension level */
|
||||
int k2_md_rtty; /* K2 RTTY mode available flag, 1 = RTTY, 0 = N/A */
|
||||
char *fw_rev; /* firmware revision level */
|
||||
int ptt_state; /* some rigs don't tell PTT state so
|
||||
we store an assumed value here for
|
||||
them */
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -186,6 +186,7 @@ const struct rig_caps ts590_caps = {
|
|||
.priv = (void *) &ts590_priv_caps,
|
||||
.rig_init = kenwood_init,
|
||||
.rig_cleanup = kenwood_cleanup,
|
||||
.rig_open = kenwood_open,
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.set_rit = kenwood_set_rit, /* FIXME should this switch to rit mode or just set the frequency? */
|
||||
|
|
Ładowanie…
Reference in New Issue