Change kenwood_open to non-fatal when ID does not match

Add kenwood_open to all kenwood rigs
Allow kenwood_open to keep searching list for a better match
pull/224/head
Michael Black 2020-04-13 08:10:07 -05:00
rodzic b94595cac9
commit dbca3e15dc
16 zmienionych plików z 22 dodań i 5 usunięć

Wyświetl plik

@ -114,7 +114,7 @@ static const struct kenwood_id_string kenwood_id_string_list[] =
{ RIG_MODEL_TS570S, "018" },
{ RIG_MODEL_TS2000, "019" },
{ RIG_MODEL_TS480, "020" },
{ RIG_MODEL_PT8000A,"020" }, // TS480 ID but behaves differently
{ RIG_MODEL_PT8000A, "020" }, // TS480 ID but behaves differently
{ RIG_MODEL_TS590S, "021" },
{ RIG_MODEL_TS990S, "022" },
{ RIG_MODEL_TS590SG, "023" },
@ -781,9 +781,10 @@ int kenwood_open(RIG *rig)
/* driver mismatch */
rig_debug(RIG_DEBUG_ERR,
"%s: wrong driver (%u instead of %d)\n",
"%s: not the right driver apparently (found %u, asked for %d, checked %s)\n",
__func__, rig->caps->rig_model,
kenwood_id_string_list[i].model);
kenwood_id_string_list[i].model,
rig->caps->model_name);
// we continue to search for other matching IDs/models
}
@ -791,7 +792,9 @@ int kenwood_open(RIG *rig)
rig_debug(RIG_DEBUG_ERR, "%s: your rig (%s) is unknown\n",
__func__, id);
return -RIG_EPROTO;
// we're making this non fatal
// mismatched IDs can still be tested
return RIG_OK;
}

Wyświetl plik

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

Wyświetl plik

@ -133,6 +133,7 @@ const struct rig_caps r5000_caps =
.priv = (void *)& r5000_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = ic10_set_freq,
.get_freq = ic10_get_freq,

Wyświetl plik

@ -170,6 +170,7 @@ const struct rig_caps thd7a_caps =
.priv = (void *)& thd7_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = th_set_freq,
.get_freq = th_get_freq,

Wyświetl plik

@ -202,6 +202,7 @@ const struct rig_caps tmd700_caps =
.priv = (void *)& tmd700_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = th_set_freq,
.get_freq = th_get_freq,

Wyświetl plik

@ -349,6 +349,7 @@ const struct rig_caps tmd710_caps =
.priv = (void *)& tmd710_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = tmd710_set_freq,
.get_freq = tmd710_get_freq,

Wyświetl plik

@ -150,6 +150,7 @@ const struct rig_caps trc80_caps =
.priv = (void *)& trc80_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
#ifdef XXREMOVEDXX

Wyświetl plik

@ -172,6 +172,7 @@ const struct rig_caps ts140_caps =
.priv = (void *)& ts140_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open, // we don't know the ID for this rig
.rig_cleanup = kenwood_cleanup,
.set_freq = kenwood_set_freq,
.get_freq = kenwood_get_freq,

Wyświetl plik

@ -148,6 +148,7 @@ const struct rig_caps ts440_caps =
.priv = (void *)& ts440_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = ic10_set_freq,
.get_freq = ic10_get_freq,

Wyświetl plik

@ -907,6 +907,7 @@ const struct rig_caps ts890s_caps =
},
.priv = (void *)& ts890s_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = kenwood_set_freq,
.get_freq = kenwood_get_freq,

Wyświetl plik

@ -176,6 +176,7 @@ const struct rig_caps ts50s_caps =
.priv = (void *)& ts50_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = kenwood_set_freq,
.get_freq = kenwood_get_freq,

Wyświetl plik

@ -178,6 +178,7 @@ const struct rig_caps ts680s_caps =
.priv = (void *)& ts680_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open, // we don't know the ID for this rig
.rig_cleanup = kenwood_cleanup,
.set_freq = kenwood_set_freq,
.get_freq = kenwood_get_freq,

Wyświetl plik

@ -190,6 +190,7 @@ const struct rig_caps ts711_caps =
.priv = (void *)& ts711_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = kenwood_set_freq,
.get_freq = kenwood_get_freq,

Wyświetl plik

@ -174,6 +174,7 @@ const struct rig_caps ts811_caps =
.priv = (void *)& ts811_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = kenwood_set_freq,
.get_freq = kenwood_get_freq,

Wyświetl plik

@ -144,6 +144,7 @@ const struct rig_caps ts930_caps =
.priv = (void *)& ts930_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open, // we don't know the ID for this rig
.rig_cleanup = kenwood_cleanup,
.set_freq = kenwood_set_freq,
.get_freq = kenwood_get_freq,

Wyświetl plik

@ -166,6 +166,7 @@ const struct rig_caps ts940_caps =
.priv = (void *)& ts940_priv_caps,
.rig_init = kenwood_init,
.rig_open = kenwood_open,
.rig_cleanup = kenwood_cleanup,
.set_freq = kenwood_set_freq,
.get_freq = kenwood_get_freq,