Deprecate rot_get_conf()

pull/1821/head
George Baltz N3GB 2025-07-28 10:43:10 -04:00
rodzic 48804dc4da
commit faad247f06
5 zmienionych plików z 18 dodań i 8 usunięć

Wyświetl plik

@ -73,13 +73,21 @@ void Rotator::setConf(const char *name, const char *val)
CHECK_ROT( rot_set_conf(theRot, tokenLookup(name), val) );
}
void Rotator::getConf(hamlib_token_t token, char *val)
HL_DEPRECATED void Rotator::getConf(hamlib_token_t token, char *val)
{
CHECK_ROT( rot_get_conf(theRot, token, val) );
CHECK_ROT( rot_get_conf2(theRot, token, val, 128) );
}
void Rotator::getConf(const char *name, char *val)
HL_DEPRECATED void Rotator::getConf(const char *name, char *val)
{
CHECK_ROT( rot_get_conf(theRot, tokenLookup(name), val) );
CHECK_ROT( rot_get_conf2(theRot, tokenLookup(name), val, 128) );
}
void Rotator::getConf2(hamlib_token_t token, char *val, int val_len)
{
CHECK_ROT( rot_get_conf2(theRot, token, val, val_len) );
}
void Rotator::getConf2(const char *name, char *val, int val_len)
{
CHECK_ROT( rot_get_conf2(theRot, tokenLookup(name), val, val_len) );
}
hamlib_token_t Rotator::tokenLookup(const char *name)

Wyświetl plik

@ -613,7 +613,7 @@ extern HAMLIB_EXPORT(int)
rot_set_conf HAMLIB_PARAMS((ROT *rot,
hamlib_token_t token,
const char *val));
extern HAMLIB_EXPORT(int)
HL_DEPRECATED extern HAMLIB_EXPORT(int)
rot_get_conf HAMLIB_PARAMS((ROT *rot,
hamlib_token_t token,
char *val));

Wyświetl plik

@ -55,6 +55,8 @@ public:
void setConf(const char *name, const char *val);
void getConf(hamlib_token_t token, char *val);
void getConf(const char *name, char *val);
void getConf2(hamlib_token_t token, char *val, int len);
void getConf2(const char *name, char *val, int len);
hamlib_token_t tokenLookup(const char *name);
void setPosition(azimuth_t az, elevation_t el);

Wyświetl plik

@ -488,7 +488,7 @@ grbltrk_rot_open(ROT *rot)
}
else if (rot->caps->rot_model == ROT_MODEL_GRBLTRK_NET)
{
rot_get_conf(rot, TOK_PATHNAME, host);
rot_get_conf2(rot, TOK_PATHNAME, host, sizeof(host));
rot_debug(RIG_DEBUG_ERR, "%s:%d ctrl via net, host [%s]\n", __func__, __LINE__,
host);
grbl_net_open(rot, 23);

Wyświetl plik

@ -1698,7 +1698,7 @@ declare_proto_rot(get_conf)
else
{
char value[4096];
ret = rot_get_conf(rot, rot_token_lookup(rot, arg1), value);
ret = rot_get_conf2(rot, rot_token_lookup(rot, arg1), value, sizeof(value));
if (ret != RIG_OK)
{
@ -2917,7 +2917,7 @@ int print_conf_list2(const struct confparams *cfp, rig_ptr_t data, FILE *fout)
ROT *rot = (ROT *) data;
char buf[128] = "";
rot_get_conf(rot, cfp->token, buf);
rot_get_conf2(rot, cfp->token, buf, sizeof(buf));
fprintf(fout, "%s: \"%s\"\n" "\t" "Default: %s, Value: %s\n",
cfp->name,
cfp->tooltip,