Update elecraft rig detection

https://github.com/Hamlib/Hamlib/issues/563Z
This commit is contained in:
Michael Black W9MDB 2021-03-03 15:57:12 -06:00
parent 5fd5bf5215
commit e38b1469a2

View File

@ -196,20 +196,27 @@ int elecraft_open(RIG *rig)
if (strstr(buf, "P")) { priv->has_kpa3 = 1; }
// could also use K4; command
if (rig->caps->rig_model == RIG_MODEL_K4) { priv->is_k4 = 1; }
else if (strstr(buf, "R")) { priv->is_k3s = 1; }
else if (strncmp(&buf[13], "--", 2) == 0) { priv->is_k3 = 1; }
priv->is_k3 = 1; // default to K3
if (rig->caps->rig_model == RIG_MODEL_K4) {
priv->is_k3 = 0;
priv->is_k4 = 1;
}
else if (strstr(buf, "R"))
{
priv->is_k3 = 0;
priv->is_k3s = 1;
}
// combination of OM flags determines model
if (strstr(buf, "S") && strstr(buf, "4") && strstr(buf, "H"))
{
// new firmware should recognize k4hd now
priv->is_k4 = 0;
priv->is_k3 = 0;
priv->is_k4hd = 1;
}
else if (strstr(buf,"S") && strstr(buf,"4"))
else if (strstr(buf, "S") && strstr(buf, "4"))
{
priv->is_k4 = 0;
priv->is_k3 = 0;
priv->is_k4d = 1;
}