pull/96/head
Michael Black 2019-03-15 06:55:38 -05:00
rodzic b6b6ffc04e
commit 1152c506da
1 zmienionych plików z 358 dodań i 345 usunięć

Wyświetl plik

@ -74,7 +74,8 @@ int ts590_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t * val);
}
static struct kenwood_priv_caps ts590_priv_caps = {
static struct kenwood_priv_caps ts590_priv_caps =
{
.cmdtrm = EOM_KEN,
};
@ -84,7 +85,8 @@ static struct kenwood_priv_caps ts590_priv_caps = {
* Notice that some rigs share the same functions.
* Also this struct is READONLY!
*/
const struct rig_caps ts590_caps = {
const struct rig_caps ts590_caps =
{
.rig_model = RIG_MODEL_TS590S,
.model_name = "TS-590S",
.mfg_name = "Kenwood",
@ -252,7 +254,8 @@ const struct rig_caps ts590_caps = {
.vfo_op = kenwood_vfo_op,
};
const struct rig_caps ts590sg_caps = {
const struct rig_caps ts590sg_caps =
{
.rig_model = RIG_MODEL_TS590SG,
.model_name = "TS-590SG",
.mfg_name = "Kenwood",
@ -435,18 +438,26 @@ const char* ts590_get_info(RIG *rig)
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
if (!rig)
{
return "*rig == NULL";
}
char firmbuf[10];
int retval;
retval = kenwood_safe_transaction(rig, "TY", firmbuf, 10, 6);
if (retval != RIG_OK)
return NULL;
switch (firmbuf[2]) {
if (retval != RIG_OK)
{
return NULL;
}
switch (firmbuf[2])
{
case 'K': return "Firmware: USA version";
case 'E': return "Firmware: European version";
default: return "Firmware: unknown";
}
}
@ -457,9 +468,11 @@ const char* ts590_get_info(RIG *rig)
*/
int ts590_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
{
switch(level) {
switch (level)
{
case RIG_LEVEL_AF:
return get_kenwood_level(rig, "AG0", &val->f);
default: return rig_get_level(rig, vfo, level, val);
}
}