Add south_zero optiont to rot_conf.c

pull/145/head
Michael Black 2019-11-23 23:08:27 -06:00
rodzic 49fde34f2f
commit cda5aa1b37
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
1 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -94,6 +94,11 @@ static const struct confparams rotfrontend_cfg_params[] =
"Maximum rotator elevation in degrees",
"90", RIG_CONF_NUMERIC, { .n = { -90, 180, .001 } }
},
{
TOK_SOUTH_ZERO, "south_zero", "South is zero deg",
"Adjust azimuth 180 degrees for south oriented rotators",
"0", RIG_CONF_CHECKBUTTON,
},
{ RIG_CONF_END, NULL, }
};
@ -306,6 +311,10 @@ int frontrot_set_conf(ROT *rot, token_t token, const char *val)
case TOK_MAX_EL:
rs->max_el = atof(val);
break;
case TOK_SOUTH_ZERO:
rs->south_zero = atoi(val);
break;
default:
return -RIG_EINVAL;
@ -534,7 +543,7 @@ const struct confparams * HAMLIB_API rot_confparam_lookup(ROT *rot,
const struct confparams *cfp;
token_t token;
rot_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_debug(RIG_DEBUG_VERBOSE, "%s called lookup=%s\n", __func__, name);
if (!rot || !rot->caps)
{
@ -585,7 +594,7 @@ token_t HAMLIB_API rot_token_lookup(ROT *rot, const char *name)
{
const struct confparams *cfp;
rot_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_debug(RIG_DEBUG_VERBOSE, "%s called lookup %s\n", __func__, name);
cfp = rot_confparam_lookup(rot, name);