kopia lustrzana https://github.com/Hamlib/Hamlib
Move rotctl south_zero to new dump protocol section for backwards compatibility
https://github.com/Hamlib/Hamlib/issues/1035pull/1148/head
rodzic
782e54e4f2
commit
42f65cc5fb
|
@ -145,16 +145,6 @@ static int netrotctl_open(ROT *rot)
|
||||||
|
|
||||||
rs->max_el = rot->caps->max_el = atof(buf);
|
rs->max_el = rot->caps->max_el = atof(buf);
|
||||||
|
|
||||||
ret = read_string(&rot->state.rotport, (unsigned char *) buf, BUF_MAX, "\n",
|
|
||||||
sizeof("\n"), 0, 1);
|
|
||||||
|
|
||||||
if (ret <= 0)
|
|
||||||
{
|
|
||||||
return (ret < 0) ? ret : -RIG_EPROTO;
|
|
||||||
}
|
|
||||||
|
|
||||||
rs->south_zero = atoi(buf);
|
|
||||||
|
|
||||||
if (prot_ver == 0) { return (RIG_OK); }
|
if (prot_ver == 0) { return (RIG_OK); }
|
||||||
|
|
||||||
// Prot 1 is tag=value format and should cover any needed additions
|
// Prot 1 is tag=value format and should cover any needed additions
|
||||||
|
@ -175,7 +165,11 @@ static int netrotctl_open(ROT *rot)
|
||||||
|
|
||||||
if (sscanf(buf, "%31[^=]=%1023[^\t\n]", setting, value) == 2)
|
if (sscanf(buf, "%31[^=]=%1023[^\t\n]", setting, value) == 2)
|
||||||
{
|
{
|
||||||
if (strstr(buf, "rot_type="))
|
if (strcmp(setting,"south_zero")==0)
|
||||||
|
{
|
||||||
|
rs->south_zero = atoi(value);
|
||||||
|
}
|
||||||
|
else if (strcmp(setting, "rot_type")==0)
|
||||||
{
|
{
|
||||||
if (strstr(buf, "AzEl")) { rot->caps->rot_type = ROT_TYPE_AZEL; }
|
if (strstr(buf, "AzEl")) { rot->caps->rot_type = ROT_TYPE_AZEL; }
|
||||||
else if (strstr(buf, "Az")) { rot->caps->rot_type = ROT_TYPE_AZIMUTH; }
|
else if (strstr(buf, "Az")) { rot->caps->rot_type = ROT_TYPE_AZIMUTH; }
|
||||||
|
|
Ładowanie…
Reference in New Issue